nested_form_fields 0.5.3 → 0.6

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: 79ceb58abeaaaed91ae93d7f48846edc50845e26
4
- data.tar.gz: 23e8ccd772a4b458fff7dff9cb6e84f21333502c
3
+ metadata.gz: 6db5cc91c0cef2549bf50762a6d4b383f9730b26
4
+ data.tar.gz: cd22dfe2aeb9c8731d879b14ade9cfb8035da3a3
5
5
  SHA512:
6
- metadata.gz: 0c849a9f26a8052210b5355c2dedfb88b27f11688b94ca2abfb127e39ef2c27c2a733e24479608a3d57b9ac7b225b111b0e175e74514d395c97f7120a226f2fa
7
- data.tar.gz: 73c52e1d17e016e32d85f948c1c0aeb0eac3dc8e8a07f374fda4a2b4425e751035ddb272961b983ede82aafdc9cb4061499f09d4912d65d4fa66f0975548c0cc
6
+ metadata.gz: 176410133dfd4a1d4bbde0c2bb84b19bb342e95767c3356e56e88d23a8fbd7546ef1ff7c92ab11ade79faa87d945ba7f86a8996144dccf19141d87ef07129992
7
+ data.tar.gz: 38c5f5147af0c38d614adf68ce07afd9160158db7f73acb869994f52d743613dd88bb9f16dae1258e2ea97cbe0e06ebaba888d3df38f32f040ba64c6ef8d2d4c
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- ruby '1.9.3'
3
+ ruby '2.1.3'
4
4
 
5
5
  # Specify your gem's dependencies in nested_form_fields.gemspec
6
6
  gemspec
data/README.md CHANGED
@@ -58,6 +58,13 @@ You can change the link text of *remove_nested_fields_link* and *add_nested_fiel
58
58
  ...
59
59
  f.add_nested_fields_link :videos, 'Add another funtastic video'
60
60
 
61
+ You can add classes to the *remove_nested_fields_link* and *add_nested_fields_link* like this:
62
+
63
+ ...
64
+ ff.remove_nested_fields_link 'Remove me', class: 'btn btn-danger'
65
+ ...
66
+ f.add_nested_fields_link :videos, 'Add another funtastic video', class: 'btn btn-primary'
67
+
61
68
  You can change the type of the element wrapping the nested fields using the *wrapper_tag* option:
62
69
 
63
70
  = f.nested_fields_for :videos, wrapper_tag: :div do |ff|
@@ -23,15 +23,15 @@ module ActionView::Helpers
23
23
  end
24
24
 
25
25
 
26
- def add_nested_fields_link association, text = nil
26
+ def add_nested_fields_link association, text = nil, options = {}
27
27
  @template.link_to text || "Add #{association.to_s.singularize.humanize}", '',
28
- class: "add_nested_fields_link",
28
+ class: "#{options[:class]} add_nested_fields_link",
29
29
  data: { association_path: association_path(association.to_s), object_class: association.to_s.singularize }
30
30
  end
31
31
 
32
- def remove_nested_fields_link text = nil
32
+ def remove_nested_fields_link text = nil, options = {}
33
33
  @template.link_to text || 'x', '',
34
- class: "remove_nested_fields_link",
34
+ class: "#{options[:class]} remove_nested_fields_link",
35
35
  data: { delete_association_field_name: delete_association_field_name, object_class: @object.class.name.underscore.downcase }
36
36
  end
37
37
 
@@ -1,3 +1,3 @@
1
1
  module NestedFormFields
2
- VERSION = "0.5.3"
2
+ VERSION = "0.6"
3
3
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.add_development_dependency 'rspec-rails', '2.9.0'
24
24
  gem.add_development_dependency 'assert_difference'
25
25
  gem.add_development_dependency 'capybara'
26
- gem.add_development_dependency 'selenium-webdriver', '>= 2.32.1'
26
+ gem.add_development_dependency 'selenium-webdriver'
27
27
  gem.add_development_dependency 'sqlite3'
28
28
  gem.add_development_dependency 'haml', '>= 3.1.5'
29
29
  gem.add_development_dependency 'haml-rails'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nested_form_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Ritsche
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-06 00:00:00.000000000 Z
11
+ date: 2014-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.32.1
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 2.32.1
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -180,6 +180,7 @@ files:
180
180
  - LICENSE
181
181
  - README.md
182
182
  - Rakefile
183
+ - lib/assets/javascripts/nested_form_fields.js.coffee
183
184
  - lib/nested_form_fields.rb
184
185
  - lib/nested_form_fields/version.rb
185
186
  - nested_form_fields.gemspec
@@ -231,7 +232,6 @@ files:
231
232
  - spec/dummy/script/rails
232
233
  - spec/integration/nested_form_fields_spec.rb
233
234
  - spec/spec_helper.rb
234
- - vendor/assets/javascripts/nested_form_fields.js.coffee
235
235
  homepage: ''
236
236
  licenses:
237
237
  - MIT