Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(object_name, object, template, options, proc) ⇒ FormBuilder

Returns a new instance of FormBuilder.



419
420
421
# File 'lib/action_view/helpers/form_helper.rb', line 419

def initialize(object_name, object, template, options, proc)
  @object_name, @object, @template, @options, @proc = object_name, object, template, options, proc        
end

Instance Attribute Details

#objectObject

Returns the value of attribute object.



417
418
419
# File 'lib/action_view/helpers/form_helper.rb', line 417

def object
  @object
end

#object_nameObject

Returns the value of attribute object_name.



417
418
419
# File 'lib/action_view/helpers/form_helper.rb', line 417

def object_name
  @object_name
end

#optionsObject

Returns the value of attribute options.



417
418
419
# File 'lib/action_view/helpers/form_helper.rb', line 417

def options
  @options
end

Instance Method Details

#check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object



432
433
434
# File 'lib/action_view/helpers/form_helper.rb', line 432

def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
  @template.check_box(@object_name, method, options.merge(:object => @object), checked_value, unchecked_value)
end

#collection_select(method, collection, value_method, text_method, options = {}, html_options = {}) ⇒ Object



350
351
352
# File 'lib/action_view/helpers/form_options_helper.rb', line 350

def collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
  @template.collection_select(@object_name, method, collection, value_method, text_method, options.merge(:object => @object), html_options)
end

#country_select(method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object



354
355
356
# File 'lib/action_view/helpers/form_options_helper.rb', line 354

def country_select(method, priority_countries = nil, options = {}, html_options = {})
  @template.country_select(@object_name, method, priority_countries, options.merge(:object => @object), html_options)
end

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



416
417
418
# File 'lib/action_view/helpers/date_helper.rb', line 416

def date_select(method, options = {})
  @template.date_select(@object_name, method, options.merge(:object => @object))
end

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



424
425
426
# File 'lib/action_view/helpers/date_helper.rb', line 424

def datetime_select(method, options = {})
  @template.datetime_select(@object_name, method, options.merge(:object => @object))
end

#radio_button(method, tag_value, options = {}) ⇒ Object



436
437
438
# File 'lib/action_view/helpers/form_helper.rb', line 436

def radio_button(method, tag_value, options = {})
  @template.radio_button(@object_name, method, tag_value, options.merge(:object => @object))
end

#select(method, choices, options = {}, html_options = {}) ⇒ Object



346
347
348
# File 'lib/action_view/helpers/form_options_helper.rb', line 346

def select(method, choices, options = {}, html_options = {})
  @template.select(@object_name, method, choices, options.merge(:object => @object), html_options)
end

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



420
421
422
# File 'lib/action_view/helpers/date_helper.rb', line 420

def time_select(method, options = {})
  @template.time_select(@object_name, method, options.merge(:object => @object))
end

#time_zone_select(method, priority_zones = nil, options = {}, html_options = {}) ⇒ Object



358
359
360
# File 'lib/action_view/helpers/form_options_helper.rb', line 358

def time_zone_select(method, priority_zones = nil, options = {}, html_options = {})
  @template.time_zone_select(@object_name, method, priority_zones, options.merge(:object => @object), html_options)
end