Class: Impulse::Forms::Builder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Defined in:
lib/impulse/forms/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#templateObject (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:,
    **objectify_options(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:,
    **objectify_options(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:,
    **objectify_options(system_args)
  ).render_tag(&block)
end