cool_nested_forms 2.0.0 → 2.0.1

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: 2e0dc8dc707e61117d10794ea7ff2889d6e7bdde
4
- data.tar.gz: 5e4cd25d4a6269fdec390efb861641d34c268ca9
3
+ metadata.gz: f3969154fb309fdbeb6d9b33aae0bfe3383f511d
4
+ data.tar.gz: 17e7eddc9d7cc5afa7ec69b5ec45bdd66aa7fa15
5
5
  SHA512:
6
- metadata.gz: 989fc6d673aeaf2830fc2afa00dfcf90904ea08592feb1365763193c80b04333acda1a1f79684aa071e4f6aec37f92bb8f988d8617150f2b443eec529c289224
7
- data.tar.gz: d68800719b9475ba36ad6cd3857746568659bfa44f6d8295388911adcc31c0bd0f1af9b2b805f7cc6417c1ffd9deba7c4de0e8c9acd54b7fa679718cc320b915
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.snakecase
16
- options[:id] ||= "#{association.name.snakecase}_[tempid]"
17
- options[:pluralized] ||= association.name.snakecase.pluralize
18
- options[:js_template_name] ||= association.name.snakecase.pluralize
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.snakecase.pluralize
64
- options[:js_template_name] ||= association.name.snakecase.pluralize
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.snakecase.pluralize
70
+ options[:target] ||= association.name.underscore.pluralize
71
71
 
72
72
  return content_tag(options[:tag],
73
73
  options[:tag_content].html_safe,
@@ -1,3 +1,3 @@
1
1
  module CoolNestedForms
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
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.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-09 00:00:00.000000000 Z
11
+ date: 2018-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails