Class: VueFormFor::FormBuilder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Includes:
VueOptionsResolver
Defined in:
lib/vue-form-for/form_builder.rb

Instance Method Summary collapse

Instance Method Details

#button(value = nil, options = {}, &block) ⇒ Object



46
47
48
49
# File 'lib/vue-form-for/form_builder.rb', line 46

def button(value = nil, options = {}, &block)
  resolve_vue_options(options)
  super(value, options, &block)
end

#check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object



23
24
25
26
27
# File 'lib/vue-form-for/form_builder.rb', line 23

def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
  resolve_vue_options(options)
  add_v_model_attribute(method, options)
  super(method, options, checked_value, unchecked_value)
end

#label(method, text = nil, options = {}, &block) ⇒ Object



18
19
20
21
# File 'lib/vue-form-for/form_builder.rb', line 18

def label(method, text = nil, options = {}, &block)
  resolve_vue_options(options)
  super(method, text, options, &block)
end

#radio_button(method, tag_value, options = {}) ⇒ Object



29
30
31
32
33
# File 'lib/vue-form-for/form_builder.rb', line 29

def radio_button(method, tag_value, options = {})
  resolve_vue_options(options)
  add_v_model_attribute(method, options)
  super(method, tag_value, options)
end

#select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object



35
36
37
38
39
# File 'lib/vue-form-for/form_builder.rb', line 35

def select(method, choices = nil, options = {}, html_options = {}, &block)
  resolve_vue_options(html_options)
  add_v_model_attribute(method, html_options)
  super(method, choices, options, html_options, &block)
end

#submit(value = nil, options = {}) ⇒ Object



41
42
43
44
# File 'lib/vue-form-for/form_builder.rb', line 41

def submit(value = nil, options = {})
  resolve_vue_options(options)
  super(value, options)
end