Class: Trek::FormBuilder
- Inherits:
-
ViewComponent::Form::Builder
- Object
- ViewComponent::Form::Builder
- Trek::FormBuilder
- Defined in:
- app/forms/trek/form_builder.rb
Instance Method Summary collapse
- #content_editor(method, options = {}) ⇒ Object
- #group(method, options = {}) ⇒ Object
- #image_field(method, options = {}) ⇒ Object
-
#link_select(method, collection, value_method, text_method, options = {}, html_options = {}) ⇒ Object
rubocop:disable Metrics/ParameterLists.
- #sound_field(method, options = {}) ⇒ Object
- #switch_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
Instance Method Details
#content_editor(method, options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'app/forms/trek/form_builder.rb', line 34 def content_editor(method, = {}, &) render_component( :content_editor, @object_name, method, (), & ) end |
#group(method, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'app/forms/trek/form_builder.rb', line 6 def group(method, = {}, &) render_component( :group, @object_name, method, (), & ) end |
#image_field(method, options = {}) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/forms/trek/form_builder.rb', line 16 def image_field(method, = {}) render_component( :image_field, @object_name, method, () ) end |
#link_select(method, collection, value_method, text_method, options = {}, html_options = {}) ⇒ Object
rubocop:disable Metrics/ParameterLists
51 52 53 54 55 56 |
# File 'app/forms/trek/form_builder.rb', line 51 def link_select(method, collection, value_method, text_method, = {}, = {}) render_component( :link_select, @object_name, method, collection, value_method, text_method, (), @default_html_options.merge() ) end |
#sound_field(method, options = {}) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'app/forms/trek/form_builder.rb', line 25 def sound_field(method, = {}) render_component( :sound_field, @object_name, method, () ) end |
#switch_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
44 45 46 47 48 |
# File 'app/forms/trek/form_builder.rb', line 44 def switch_box(method, = {}, checked_value = "1", unchecked_value = "0") render_component( :switch_box, @object_name, method, checked_value, unchecked_value, () ) end |