awesome_nested_fields 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -1
- data/lib/awesome_nested_fields/version.rb +1 -1
- data/lib/rails/form_helper.rb +2 -2
- metadata +9 -7
data/README.md
CHANGED
@@ -178,6 +178,13 @@ The code above inserts a new item and does not execute the `beforeInsert` callba
|
|
178
178
|
These methods can be called from the element where nested fields are applied (e.g. a form) or from any element inside it (e.g. an input or the container itself).
|
179
179
|
|
180
180
|
|
181
|
+
Demo
|
182
|
+
----
|
183
|
+
|
184
|
+
There is a live demo at http://phonebook.guava.com.br/.
|
185
|
+
You can find the demo code at https://github.com/lailsonbm/awesome_nested_fields_demo.
|
186
|
+
|
187
|
+
|
181
188
|
Compatibility
|
182
189
|
-------------
|
183
190
|
|
@@ -188,8 +195,9 @@ TODO
|
|
188
195
|
----
|
189
196
|
|
190
197
|
* Write tests
|
191
|
-
* Write awesome demos
|
192
198
|
* Make sure it can degrade gracefully
|
199
|
+
* Implement jQuery autoload
|
200
|
+
* Make `nested_fields_for` works without a block (looking for partials)
|
193
201
|
|
194
202
|
|
195
203
|
Copyleft
|
data/lib/rails/form_helper.rb
CHANGED
@@ -4,8 +4,8 @@ ActionView::Helpers::FormBuilder.class_eval do
|
|
4
4
|
|
5
5
|
options[:new_item_index] ||= 'new_nested_item'
|
6
6
|
options[:new_object] ||= self.object.class.reflect_on_association(association).klass.new
|
7
|
-
options[:item_template_class] ||= 'template item'
|
8
|
-
options[:empty_template_class] ||= 'template empty'
|
7
|
+
options[:item_template_class] ||= ['template', 'item', association.to_s.singularize].join(' ')
|
8
|
+
options[:empty_template_class] ||= ['template', 'empty', association.to_s.singularize].join(' ')
|
9
9
|
options[:show_empty] ||= false
|
10
10
|
|
11
11
|
output = @template.capture { fields_for(association, &block) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_nested_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-07-
|
12
|
+
date: 2011-07-22 00:00:00.000000000 -03:00
|
13
|
+
default_executable:
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bundler
|
16
|
-
requirement: &
|
17
|
+
requirement: &2161324400 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
19
|
requirements:
|
19
20
|
- - ! '>='
|
@@ -21,10 +22,10 @@ dependencies:
|
|
21
22
|
version: 1.0.0
|
22
23
|
type: :development
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
+
version_requirements: *2161324400
|
25
26
|
- !ruby/object:Gem::Dependency
|
26
27
|
name: rails
|
27
|
-
requirement: &
|
28
|
+
requirement: &2161323780 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
30
|
requirements:
|
30
31
|
- - ! '>='
|
@@ -32,7 +33,7 @@ dependencies:
|
|
32
33
|
version: 3.0.0
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
+
version_requirements: *2161323780
|
36
37
|
description: Awesome dynamic nested fields for Rails and jQuery
|
37
38
|
email: lailson@guava.com.br
|
38
39
|
executables: []
|
@@ -53,6 +54,7 @@ files:
|
|
53
54
|
- lib/generators/awesome_nested_fields/install/install_generator.rb
|
54
55
|
- lib/rails/form_helper.rb
|
55
56
|
- vendor/assets/javascripts/jquery.nested-fields.js
|
57
|
+
has_rdoc: true
|
56
58
|
homepage: http://rubygems.org/gems/awesome_nested_fields
|
57
59
|
licenses: []
|
58
60
|
post_install_message:
|
@@ -73,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
75
|
version: 1.3.6
|
74
76
|
requirements: []
|
75
77
|
rubyforge_project: awesome_nested_fields
|
76
|
-
rubygems_version: 1.
|
78
|
+
rubygems_version: 1.6.2
|
77
79
|
signing_key:
|
78
80
|
specification_version: 3
|
79
81
|
summary: Awesome nested fields for Rails
|