nested_form_fields 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/README.md +32 -3
- data/lib/assets/javascripts/nested_form_fields.js.coffee +1 -1
- data/lib/nested_form_fields/version.rb +1 -1
- data/nested_form_fields.gemspec +4 -3
- metadata +29 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cd4df0cf94166b6a42a70a0676168960735f6fd92d1cc07ba6c942495e4042e2
|
4
|
+
data.tar.gz: de6ca1333d9d98c2a965c1526c6cf17c43ccf617000cabbed1d279ab04c2fdb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d91f11f1dadf41e12edd49d63a2eee4d126ceace8e0cf93eb6d595e2db28245ea61dbab4bffcf4ddf4307d816cda9e3ae08f33a2932056e3f512dbb3c9de9770
|
7
|
+
data.tar.gz: ec662c27318ba48fff3ef627fd94529a25872bca7c15e170640236be537657ff577b6d47838a5b2603d27284a7d8aeafde0198bac56287fd1a9acd2e2f66777c
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -14,15 +14,44 @@ It uses jQuery to dynamically add and remove nested associations.
|
|
14
14
|
|
15
15
|
Add this line to your application's Gemfile:
|
16
16
|
|
17
|
-
|
17
|
+
```ruby
|
18
|
+
gem 'nested_form_fields'
|
19
|
+
```
|
18
20
|
|
19
21
|
And then execute:
|
20
22
|
|
21
|
-
|
23
|
+
```console
|
24
|
+
$ bundle
|
25
|
+
```
|
22
26
|
|
23
27
|
In your application.js file add:
|
24
28
|
|
25
|
-
|
29
|
+
```javascript
|
30
|
+
//= require nested_form_fields
|
31
|
+
```
|
32
|
+
|
33
|
+
### Rails 5.1+
|
34
|
+
|
35
|
+
You will need to install jQuery as Rails dropped it from its default stack.
|
36
|
+
|
37
|
+
Add to Gemfile:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
gem 'jquery-rails'
|
41
|
+
```
|
42
|
+
|
43
|
+
Execute:
|
44
|
+
|
45
|
+
```console
|
46
|
+
$ bundle
|
47
|
+
```
|
48
|
+
|
49
|
+
Add to application.js:
|
50
|
+
|
51
|
+
```javascript
|
52
|
+
//= require jquery3
|
53
|
+
//= require jquery_ujs
|
54
|
+
```
|
26
55
|
|
27
56
|
## Usage
|
28
57
|
|
@@ -39,7 +39,7 @@ nested_form_fields.bind_nested_forms_links = () ->
|
|
39
39
|
$('body').off("click", '.remove_nested_fields_link')
|
40
40
|
$('body').on 'click', '.remove_nested_fields_link', ->
|
41
41
|
$link = $(this)
|
42
|
-
return false unless $.rails.allowAction($link)
|
42
|
+
return false unless $.rails == undefined || $.rails.allowAction($link)
|
43
43
|
object_class = $link.data('object-class')
|
44
44
|
delete_association_field_name = $link.data('delete-association-field-name')
|
45
45
|
removed_index = parseInt(delete_association_field_name.match('(\\d+\\]\\[_destroy])')[0].match('\\d+')[0])
|
data/nested_form_fields.gemspec
CHANGED
@@ -25,10 +25,11 @@ Gem::Specification.new do |gem|
|
|
25
25
|
gem.add_development_dependency 'nokogiri', '1.6.8.1'
|
26
26
|
gem.add_development_dependency 'assert_difference'
|
27
27
|
gem.add_development_dependency 'capybara'
|
28
|
-
gem.add_development_dependency '
|
29
|
-
gem.add_development_dependency '
|
28
|
+
gem.add_development_dependency 'geckodriver-helper'
|
29
|
+
gem.add_development_dependency 'selenium-webdriver', '> 3.0.5'
|
30
|
+
gem.add_development_dependency 'sqlite3', '~> 1.3.6'
|
30
31
|
gem.add_development_dependency 'haml', '>= 3.1.5'
|
31
|
-
gem.add_development_dependency 'haml-rails'
|
32
|
+
gem.add_development_dependency 'haml-rails', '~> 0.4.0'
|
32
33
|
gem.add_development_dependency 'sass-rails', '~> 3.2.3'
|
33
34
|
gem.add_development_dependency 'test-unit', '1.2.3'
|
34
35
|
gem.add_development_dependency 'public_suffix', '~> 1.4.6'
|
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.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nico Ritsche
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -108,34 +108,48 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: geckodriver-helper
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: selenium-webdriver
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ">"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
131
|
+
version: 3.0.5
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ">"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
138
|
+
version: 3.0.5
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: sqlite3
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- - "
|
143
|
+
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
145
|
+
version: 1.3.6
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- - "
|
150
|
+
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
152
|
+
version: 1.3.6
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: haml
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,16 +168,16 @@ dependencies:
|
|
154
168
|
name: haml-rails
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- - "
|
171
|
+
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
173
|
+
version: 0.4.0
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- - "
|
178
|
+
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
180
|
+
version: 0.4.0
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: sass-rails
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -297,8 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
311
|
- !ruby/object:Gem::Version
|
298
312
|
version: '0'
|
299
313
|
requirements: []
|
300
|
-
|
301
|
-
rubygems_version: 2.5.1
|
314
|
+
rubygems_version: 3.0.4
|
302
315
|
signing_key:
|
303
316
|
specification_version: 4
|
304
317
|
summary: Rails gem for dynamically adding and removing nested has_many association
|