vue-form-for 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/vue-form-for.rb +2 -2
- data/lib/vue-form-for/form_builder.rb +12 -1
- data/lib/vue-form-for/railtie.rb +2 -2
- 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: 015eb9f37a5a044a4cb60a65b638f588e7446e30
|
4
|
+
data.tar.gz: 4e1c4171f049ce653624f82972a50f3329e2a729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0adfff9bf46564f92f033b55cf097ee21be9972239ba535f0cbeb32d7489f3b0461f12fb3eea468ffa21aa2998cb695640b1d9ddde42b14bff95886e0fd3b04
|
7
|
+
data.tar.gz: a28db07d57e26625897a69980667f498348c69ba00a7da031ee4a573a76949586e3db460d12506c825af1610498dcff65d223c0ec3451296a82ec72acc556c99
|
data/CHANGELOG.md
CHANGED
data/lib/vue-form-for.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "vue-form-for/form_builder"
|
2
|
+
require "vue-form-for/railtie"
|
@@ -4,7 +4,8 @@ module VueFormFor
|
|
4
4
|
class FormBuilder < ActionView::Helpers::FormBuilder
|
5
5
|
include VueFormFor::VueOptionsResolver
|
6
6
|
|
7
|
-
(field_helpers - [:label, :fields_for])
|
7
|
+
(field_helpers - [:label, :check_box, :radio_button, :fields_for])
|
8
|
+
.each do |selector|
|
8
9
|
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
|
9
10
|
def #{selector}(method, options = {})
|
10
11
|
resolve_vue_options(options)
|
@@ -19,6 +20,16 @@ module VueFormFor
|
|
19
20
|
super(method, text, options, &block)
|
20
21
|
end
|
21
22
|
|
23
|
+
def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
|
24
|
+
resolve_vue_options(options)
|
25
|
+
super(method, options, checked_value, unchecked_value)
|
26
|
+
end
|
27
|
+
|
28
|
+
def radio_button(method, tag_value, options = {})
|
29
|
+
resolve_vue_options(options)
|
30
|
+
super(method, tag_value, options)
|
31
|
+
end
|
32
|
+
|
22
33
|
def submit(value = nil, options = {})
|
23
34
|
resolve_vue_options(options)
|
24
35
|
super(value, options)
|
data/lib/vue-form-for/railtie.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vue-form-for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.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: 2017-04-
|
11
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|