Class: ActionView::Helpers::FormBuilder
- Inherits:
-
Object
- Object
- ActionView::Helpers::FormBuilder
- Defined in:
- lib/action_view/helpers/form_helper.rb,
lib/action_view/helpers/date_helper.rb,
lib/action_view/helpers/form_options_helper.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
-
#object_name ⇒ Object
Returns the value of attribute object_name.
Instance Method Summary collapse
- #check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
- #collection_select(method, collection, value_method, text_method, options = {}, html_options = {}) ⇒ Object
- #country_select(method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object
- #date_select(method, options = {}) ⇒ Object
- #datetime_select(method, options = {}) ⇒ Object
-
#initialize(object_name, object, template, options, proc) ⇒ FormBuilder
constructor
A new instance of FormBuilder.
- #radio_button(method, tag_value, options = {}) ⇒ Object
- #select(method, choices, options = {}, html_options = {}) ⇒ Object
- #time_zone_select(method, priority_zones = nil, options = {}, html_options = {}) ⇒ Object
Constructor Details
#initialize(object_name, object, template, options, proc) ⇒ FormBuilder
Returns a new instance of FormBuilder.
384 385 386 |
# File 'lib/action_view/helpers/form_helper.rb', line 384 def initialize(object_name, object, template, , proc) @object_name, @object, @template, @options, @proc = object_name, object, template, , proc end |
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object.
382 383 384 |
# File 'lib/action_view/helpers/form_helper.rb', line 382 def object @object end |
#object_name ⇒ Object
Returns the value of attribute object_name.
382 383 384 |
# File 'lib/action_view/helpers/form_helper.rb', line 382 def object_name @object_name end |
Instance Method Details
#check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
397 398 399 |
# File 'lib/action_view/helpers/form_helper.rb', line 397 def check_box(method, = {}, checked_value = "1", unchecked_value = "0") @template.check_box(@object_name, method, .merge(:object => @object), checked_value, unchecked_value) end |
#collection_select(method, collection, value_method, text_method, options = {}, html_options = {}) ⇒ Object
348 349 350 |
# File 'lib/action_view/helpers/form_options_helper.rb', line 348 def collection_select(method, collection, value_method, text_method, = {}, = {}) @template.collection_select(@object_name, method, collection, value_method, text_method, .merge(:object => @object), ) end |
#country_select(method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object
352 353 354 |
# File 'lib/action_view/helpers/form_options_helper.rb', line 352 def country_select(method, priority_countries = nil, = {}, = {}) @template.country_select(@object_name, method, priority_countries, .merge(:object => @object), ) end |
#date_select(method, options = {}) ⇒ Object
298 299 300 |
# File 'lib/action_view/helpers/date_helper.rb', line 298 def date_select(method, = {}) @template.date_select(@object_name, method, .merge(:object => @object)) end |
#datetime_select(method, options = {}) ⇒ Object
302 303 304 |
# File 'lib/action_view/helpers/date_helper.rb', line 302 def datetime_select(method, = {}) @template.datetime_select(@object_name, method, .merge(:object => @object)) end |
#radio_button(method, tag_value, options = {}) ⇒ Object
401 402 403 |
# File 'lib/action_view/helpers/form_helper.rb', line 401 def (method, tag_value, = {}) @template.(@object_name, method, tag_value, .merge(:object => @object)) end |
#select(method, choices, options = {}, html_options = {}) ⇒ Object
344 345 346 |
# File 'lib/action_view/helpers/form_options_helper.rb', line 344 def select(method, choices, = {}, = {}) @template.select(@object_name, method, choices, .merge(:object => @object), ) end |
#time_zone_select(method, priority_zones = nil, options = {}, html_options = {}) ⇒ Object
356 357 358 |
# File 'lib/action_view/helpers/form_options_helper.rb', line 356 def time_zone_select(method, priority_zones = nil, = {}, = {}) @template.time_zone_select(@object_name, method, priority_zones, .merge(:object => @object), ) end |