Module: ActiveScaffold::Bridges::Chosen::Helpers::FormColumnHelpers
- Defined in:
- lib/active_scaffold/bridges/chosen/helpers.rb
Instance Method Summary collapse
-
#active_scaffold_input_chosen(column, html_options) ⇒ Object
requires RecordSelect plugin to be installed and configured.
Instance Method Details
#active_scaffold_input_chosen(column, html_options) ⇒ Object
requires RecordSelect plugin to be installed and configured.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/active_scaffold/bridges/chosen/helpers.rb', line 12 def active_scaffold_input_chosen(column, ) [:class] << ' chosen' if column.plural_association? , = (column) = {:selected => .collect {|a| a[1]}, :include_blank => as_(:_select_)} .update(:multiple => true).update(column.[:html_options] || {}) .update(column.) [:name] = "#{[:name]}[]" if [:multiple] == true && ![:name].to_s.ends_with?("[]") if optgroup = .delete(:optgroup) select(:record, column.name, (column, , optgroup), , ) else collection_select(:record, column.name, , :id, :to_label, , ) end else active_scaffold_input_select(column, ) end end |