Class: Caisson::Helpers::Form::Field::Select
- Defined in:
- lib/caisson/helpers/form/field/select.rb
Instance Method Summary collapse
-
#build(name, choices, selection, options = {}) ⇒ Object
************************************************************************************* PUBLIC INSTANCE METHODS *************************************************************************************.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Caisson::Helpers::Form::Field::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Caisson::Helpers::Form::Field::Base
Instance Method Details
#build(name, choices, selection, options = {}) ⇒ Object
************************************************************************************* PUBLIC INSTANCE METHODS *************************************************************************************
9 10 11 12 13 14 15 |
# File 'lib/caisson/helpers/form/field/select.rb', line 9 def build(name, choices, selection, ={}) .reverse_merge!(class: nil, submit: false, translate: true) choices = get_choices(choices, [:translate]) return select_tag(name, (choices, selection), generate_attributes()) end |