vue-rails-form-builder 0.8.0 → 0.8.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/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/vue-rails-form-builder/form_builder.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: 1c194481a63376221cdb778a8f661fcafc62fd15
|
4
|
+
data.tar.gz: 47ea7ad78d26377265b952a5e0a084151c069ec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc51b9f0c473cba2c7291913ea2710dccba2e033ee80dbecd32e6246654075dc1f99d10a8ccf933a3e1878b58653611b047329ffd0442ae0113335c2adc7b0c
|
7
|
+
data.tar.gz: 4f2526c24c4765579a2e825f618e09e334eb8f4688aefd1771ca4ef4f2319c6c0b5d052c7755c4d82f433f9cbde23daf7cfa9ac4c9ed8ffabcce653bf8dc87e6
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -252,17 +252,17 @@ This method is convenient especially when the form has nested attributes:
|
|
252
252
|
<%= f.text_field :name %>
|
253
253
|
<%= f.fields_for :emails do |g| %>
|
254
254
|
<%= g.text_field :address,
|
255
|
-
|
255
|
+
disabled: "user.emails_attributes[#{g.index}]._destroy" %>
|
256
256
|
<%= g.check_box :_destroy if g.object.persisted? %>
|
257
257
|
<% end %>
|
258
|
-
<%= f.submit "Create", disabled: "
|
258
|
+
<%= f.submit "Create", disabled: "#{f.vue_prefix}.name === ''" %>
|
259
259
|
<% end %>
|
260
260
|
```
|
261
261
|
|
262
262
|
Using the `vue_prefix` method, you can rewrite the fifth line more concisely:
|
263
263
|
|
264
264
|
```erb
|
265
|
-
|
265
|
+
disabled: g.vue_prefix + "._destroy" %>
|
266
266
|
```
|
267
267
|
|
268
268
|
Data Initialization
|
@@ -4,7 +4,7 @@ module VueRailsFormBuilder
|
|
4
4
|
class FormBuilder < ActionView::Helpers::FormBuilder
|
5
5
|
include VueRailsFormBuilder::VueOptionsResolver
|
6
6
|
|
7
|
-
(field_helpers - [:label, :check_box, :radio_button, :fields_for])
|
7
|
+
(field_helpers - [:label, :check_box, :radio_button, :fields_for, :file_field])
|
8
8
|
.each do |selector|
|
9
9
|
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
|
10
10
|
def #{selector}(method, options = {})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vue-rails-form-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tsutomu KURODA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|