We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d90cdf7 commit 18810b0Copy full SHA for 18810b0
lib/vue-form-for/form_builder.rb
@@ -4,7 +4,8 @@ module VueFormFor
4
class FormBuilder < ActionView::Helpers::FormBuilder
5
include VueFormFor::VueOptionsResolver
6
7
- (field_helpers - [:label, :fields_for]).each do |selector|
+ (field_helpers - [:label, :check_box, :radio_button, :fields_for])
8
+ .each do |selector|
9
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
10
def #{selector}(method, options = {})
11
resolve_vue_options(options)
@@ -19,6 +20,16 @@ def label(method, text = nil, options = {}, &block)
19
20
super(method, text, options, &block)
21
end
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
30
+ super(method, tag_value, options)
31
32
33
def submit(value = nil, options = {})
34
35
super(value, options)
0 commit comments