Class: PolarisForm::Builder

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

Instance Method Summary collapse

Instance Method Details

#s_checkbox(method, options = {}, checked_value = '1', unchecked_value = '0') ⇒ Object



3
4
5
# File 'lib/polaris_form/builder.rb', line 3

def s_checkbox(method, options = {}, checked_value = '1', unchecked_value = '0')
  PolarisForm::Tag::Checkbox.new(@object_name, method, @template, checked_value, unchecked_value, objectify_options(options)).render
end

#s_color_field(method, options = {}) ⇒ Object

def s_choice_list(method, options = {}, &block) @template.s_choice_list_tag(@object_name, method, objectify_options(options), &block) end



11
12
13
# File 'lib/polaris_form/builder.rb', line 11

def s_color_field(method, options = {})
  PolarisForm::Tag::ColorField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_color_picker(method, options = {}) ⇒ Object



15
16
17
# File 'lib/polaris_form/builder.rb', line 15

def s_color_picker(method, options = {})
  PolarisForm::Tag::ColorPicker.new(@object_name, method, @template, objectify_options(options)).render
end

#s_date_field(method, options = {}) ⇒ Object



19
20
21
# File 'lib/polaris_form/builder.rb', line 19

def s_date_field(method, options = {})
  PolarisForm::Tag::DateField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_date_picker(method, options = {}) ⇒ Object



23
24
25
# File 'lib/polaris_form/builder.rb', line 23

def s_date_picker(method, options = {})
  PolarisForm::Tag::DatePicker.new(@object_name, method, @template, objectify_options(options)).render
end

#s_drop_zone(method, options = {}) ⇒ Object



27
28
29
# File 'lib/polaris_form/builder.rb', line 27

def s_drop_zone(method, options = {})
  PolarisForm::Tag::DropZone.new(@object_name, method, @template, objectify_options(options)).render
end

#s_email_field(method, options = {}) ⇒ Object



31
32
33
# File 'lib/polaris_form/builder.rb', line 31

def s_email_field(method, options = {})
  PolarisForm::Tag::EmailField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_money_field(method, options = {}) ⇒ Object



35
36
37
# File 'lib/polaris_form/builder.rb', line 35

def s_money_field(method, options = {})
  PolarisForm::Tag::MoneyField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_number_field(method, options = {}) ⇒ Object



39
40
41
# File 'lib/polaris_form/builder.rb', line 39

def s_number_field(method, options = {})
  PolarisForm::Tag::NumberField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_password_field(method, options = {}) ⇒ Object



43
44
45
# File 'lib/polaris_form/builder.rb', line 43

def s_password_field(method, options = {})
  PolarisForm::Tag::PasswordField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_search_field(method, options = {}) ⇒ Object



47
48
49
# File 'lib/polaris_form/builder.rb', line 47

def s_search_field(method, options = {})
  PolarisForm::Tag::SearchField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_select(method, choices = nil, options = {}, html_options = {}, &block) ⇒ Object



51
52
53
# File 'lib/polaris_form/builder.rb', line 51

def s_select(method, choices = nil, options = {}, html_options = {}, &block)
  PolarisForm::Tag::Select.new(@object_name, method, @template, choices, objectify_options(options), html_options).render(&block)
end

#s_switch(method, options = {}, checked_value = '1', unchecked_value = '0') ⇒ Object



55
56
57
# File 'lib/polaris_form/builder.rb', line 55

def s_switch(method, options = {}, checked_value = '1', unchecked_value = '0')
  PolarisForm::Tag::Switch.new(@object_name, method, @template, checked_value, unchecked_value, objectify_options(options)).render
end

#s_text_area(method, options = {}) ⇒ Object



59
60
61
# File 'lib/polaris_form/builder.rb', line 59

def s_text_area(method, options = {})
  PolarisForm::Tag::TextArea.new(@object_name, method, @template, objectify_options(options)).render
end

#s_text_field(method, options = {}) ⇒ Object



63
64
65
# File 'lib/polaris_form/builder.rb', line 63

def s_text_field(method, options = {})
  PolarisForm::Tag::TextField.new(@object_name, method, @template, objectify_options(options)).render
end

#s_url_field(method, options = {}) ⇒ Object



67
68
69
# File 'lib/polaris_form/builder.rb', line 67

def s_url_field(method, options = {})
  PolarisForm::Tag::UrlField.new(@object_name, method, @template, objectify_options(options)).render
end