class VueRailsFormBuilder::FormBuilder
Public Instance Methods
check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
click to toggle source
Calls superclass method
# File lib/vue-rails-form-builder/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
file_field(method, options = {})
click to toggle source
Calls superclass method
# File lib/vue-rails-form-builder/form_builder.rb, line 41 def file_field(method, options = {}) resolve_vue_options(options) super(method, options) end
label(method, text = nil, options = {}, &block)
click to toggle source
Calls superclass method
# File lib/vue-rails-form-builder/form_builder.rb, line 18 def label(method, text = nil, options = {}, &block) resolve_vue_options(options) super(method, text, options, &block) end
select(method, choices = nil, options = {}, html_options = {}, &block)
click to toggle source
Calls superclass method
# File lib/vue-rails-form-builder/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 = {})
click to toggle source
Calls superclass method
# File lib/vue-rails-form-builder/form_builder.rb, line 46 def submit(value = nil, options = {}) resolve_vue_options(options) super(value, options) end
vue_prefix()
click to toggle source
# 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