Class: Impulse::Forms::Builder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- Impulse::Forms::Builder
- Defined in:
- lib/impulse/forms/builder.rb
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
- #ajax_select(method_name, value_method, text_method, **system_args, &block) ⇒ Object
- #select(method_name, choices = [], **system_args, &block) ⇒ Object
- #time_zone_select(method_name, priority_zones = nil, **system_args, &block) ⇒ Object
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
4 5 6 |
# File 'lib/impulse/forms/builder.rb', line 4 def template @template end |
Instance Method Details
#ajax_select(method_name, value_method, text_method, **system_args, &block) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/impulse/forms/builder.rb', line 18 def ajax_select(method_name, value_method, text_method, **system_args, &block) Tags::AjaxSelect.new( object:, object_name:, method_name:, template:, value_method:, text_method:, **(system_args) ).render_tag(&block) end |
#select(method_name, choices = [], **system_args, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/impulse/forms/builder.rb', line 7 def select(method_name, choices = [], **system_args, &block) Tags::Select.new( object:, object_name:, method_name:, template:, choices:, **(system_args) ).render_tag(&block) end |
#time_zone_select(method_name, priority_zones = nil, **system_args, &block) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/impulse/forms/builder.rb', line 30 def time_zone_select(method_name, priority_zones = nil, **system_args, &block) Tags::TimeZoneSelect.new( object:, object_name:, method_name:, template:, priority_zones:, **(system_args) ).render_tag(&block) end |