Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/labelize.rb

Instance Method Summary collapse

Instance Method Details

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



2
3
4
5
# File 'lib/labelize.rb', line 2

def select(method, choices=nil, options = {}, html_options = {})
  choices ||= method.to_s.gsub('_id','').camelize.constantize.options
  @template.select(@object_name, method, choices, options.merge(:object => @object), html_options)
end