Class: VueRailsFormBuilder::FormBuilder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- VueRailsFormBuilder::FormBuilder
- Includes:
- VueOptionsResolver
- Defined in:
- lib/vue-rails-form-builder/form_builder.rb
Instance Method Summary collapse
- #button(value = nil, options = {}, &block) ⇒ Object
- #check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
- #file_field(method, options = {}) ⇒ Object
- #label(method, text = nil, options = {}, &block) ⇒ Object
- #radio_button(method, tag_value, options = {}) ⇒ Object
- #select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object
- #submit(value = nil, options = {}) ⇒ Object
- #vue_prefix ⇒ Object
Instance Method Details
#button(value = nil, options = {}, &block) ⇒ Object
51 52 53 54 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 51 def (value = nil, = {}, &block) () super(value, , &block) end |
#check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
23 24 25 26 27 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 23 def check_box(method, = {}, checked_value = "1", unchecked_value = "0") () add_v_model_attribute(method, ) super(method, , checked_value, unchecked_value) end |
#file_field(method, options = {}) ⇒ Object
41 42 43 44 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 41 def file_field(method, = {}) () super(method, ) end |
#label(method, text = nil, options = {}, &block) ⇒ Object
18 19 20 21 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 18 def label(method, text = nil, = {}, &block) () super(method, text, , &block) end |
#radio_button(method, tag_value, options = {}) ⇒ Object
29 30 31 32 33 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 29 def (method, tag_value, = {}) () add_v_model_attribute(method, ) super(method, tag_value, ) end |
#select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object
35 36 37 38 39 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 35 def select(method, choices = nil, = {}, = {}, &block) () add_v_model_attribute(method, ) super(method, choices, , , &block) end |
#submit(value = nil, options = {}) ⇒ Object
46 47 48 49 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 46 def submit(value = nil, = {}) () super(value, ) end |
#vue_prefix ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/vue-rails-form-builder/form_builder.rb', line 56 def vue_prefix path = @object_name.gsub(/\[/, ".").gsub(/\]/, "").split(".") if @options[:vue_scope] path[0] = @options[:vue_scope] end path.join(".").gsub(/\.(\d+)/, '[\1]') end |