editable_components 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b9da05cf8c46f15fde699247172243145297a9d
4
- data.tar.gz: 57698e25090be81d4bdc8488aca81b471a7874b9
3
+ metadata.gz: 200fed582fb17cac432de9f0bf4f2b96b9d85942
4
+ data.tar.gz: e580721dca4b54a3356eb7db8a5699c9b1d9668a
5
5
  SHA512:
6
- metadata.gz: 7fc23be9b8ebbcd7732652f5f418d0c9091248d2736a1295074596687eb9759d18d6294d2a89f8d97ff69128279d8f7e1d2d12ae609bb3db45c052d1efc8161f
7
- data.tar.gz: 53070853e6f5e09fcb0fec4821be5c915aebcd386f2c0b36d2878da239977f82da587e054ba1250a5c03470e66e96dd5c6ac61b33773b942317f74966510a38f
6
+ metadata.gz: 230366bebdb5551b1fb1b6af0f43505b15c07b771b4bf8838689fea4f4efec5de16c906a200b5f52131322914df37e5a19dec8ece64a2e0f11d2494bad3c7465
7
+ data.tar.gz: b1eeb2f5fa58c2b9c86b6e0c2a460fc642c31d7659600da38825f3d24f146d1763328044185a08e808781908d9c4156644f682f30c42b162f5a1d3d983ea23a5
data/README.md CHANGED
@@ -16,7 +16,12 @@ Goals:
16
16
 
17
17
  ### Install
18
18
 
19
- - Add to the Gemfile: `gem 'editable_components'`
19
+ - Add to the Gemfile:
20
+
21
+ ```ruby
22
+ gem 'amoeba'
23
+ gem 'editable_components'
24
+ ```
20
25
 
21
26
  - Copy migrations (Rails 5.x syntax, in Rails 4.x use rake): `rails editable_components:install:migrations`
22
27
 
@@ -28,6 +33,10 @@ Goals:
28
33
 
29
34
  - Add to your application layout (before body closing): `<%= javascript_include_tag( EditableComponents::Engine.js ) if EditableComponents::Engine.js %>`
30
35
 
36
+ - Add to routes: `mount EditableComponents::Engine => '/components'`
37
+
38
+ - Add to your controller (ex. in _show_ method): `EditableComponents::Engine.edit_mode = !params[:preview]`
39
+
31
40
  - Add your blocks to the views (ex. in show):
32
41
  ```erb
33
42
  <%= render layout: 'editable_components/blocks', locals: { container: @page } do |blocks| %>
@@ -2,7 +2,7 @@
2
2
  var ecMain = (function() {
3
3
  this.editing = false;
4
4
  return {
5
- createInput( parent, name, value ) {
5
+ createInput: function( parent, name, value ) {
6
6
  var el = document.createElement( 'input' );
7
7
  el.setAttribute( 'type', 'hidden' );
8
8
  el.setAttribute( 'name', name );
@@ -1,3 +1,3 @@
1
1
  module EditableComponents
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editable_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-03 00:00:00.000000000 Z
11
+ date: 2017-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -44,6 +44,62 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 3.0.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: activerecord
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: capybara
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: mysql2
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: pry
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
47
103
  description: UI components editable from the front-end for Rails
48
104
  email:
49
105
  - mat@blocknot.es