cool_nested_forms 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/cool_nested_forms_helper.rb +7 -7
- data/lib/cool_nested_forms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3969154fb309fdbeb6d9b33aae0bfe3383f511d
|
|
4
|
+
data.tar.gz: 17e7eddc9d7cc5afa7ec69b5ec45bdd66aa7fa15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cbf8acbb798e52da93f002bd04fd9b1e61587a652e91403c96f1d3c6755e910e171884a7af7f616ae81caf7087faade7affc33d106d6e1314620b9546f1a28a5
|
|
7
|
+
data.tar.gz: 154c51f82021bd7fa9beb0c7c50ee413fc277262ca4c87f342b5ecbc0d795635ea92b7dc20715864ad0d748e96f19bbd85732122b70771de435065536f8d6dff
|
|
@@ -12,10 +12,10 @@ module CoolNestedFormsHelper
|
|
|
12
12
|
# - children: an array with childre association options for nested association of a nested association
|
|
13
13
|
def new_entry_template(builder,association, options = {})
|
|
14
14
|
# initialize options
|
|
15
|
-
options[:partial] ||= association.name.
|
|
16
|
-
options[:id] ||= "#{association.name.
|
|
17
|
-
options[:pluralized] ||= association.name.
|
|
18
|
-
options[:js_template_name] ||= association.name.
|
|
15
|
+
options[:partial] ||= association.name.underscore
|
|
16
|
+
options[:id] ||= "#{association.name.underscore}_[tempid]"
|
|
17
|
+
options[:pluralized] ||= association.name.underscore.pluralize
|
|
18
|
+
options[:js_template_name] ||= association.name.underscore.pluralize
|
|
19
19
|
options[:children] ||= []
|
|
20
20
|
|
|
21
21
|
# children output
|
|
@@ -60,14 +60,14 @@ module CoolNestedFormsHelper
|
|
|
60
60
|
# - tag: override the returned tag
|
|
61
61
|
# - tag_content: override the returned tag content
|
|
62
62
|
def new_entry_button(name, association, options = {})
|
|
63
|
-
options[:pluralized] ||= association.name.
|
|
64
|
-
options[:js_template_name] ||= association.name.
|
|
63
|
+
options[:pluralized] ||= association.name.underscore.pluralize
|
|
64
|
+
options[:js_template_name] ||= association.name.underscore.pluralize
|
|
65
65
|
options[:class] ||= ""
|
|
66
66
|
options[:style] ||= ""
|
|
67
67
|
options[:child_js_template_names] ||= ""
|
|
68
68
|
options[:tag] ||= :span
|
|
69
69
|
options[:tag_content] ||= "<span>#{name}</span>"
|
|
70
|
-
options[:target] ||= association.name.
|
|
70
|
+
options[:target] ||= association.name.underscore.pluralize
|
|
71
71
|
|
|
72
72
|
return content_tag(options[:tag],
|
|
73
73
|
options[:tag_content].html_safe,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cool_nested_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carlos Roque
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-05-
|
|
11
|
+
date: 2018-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|