Method: ActiveSettings::Config::Definition#normalize_selection
- Defined in:
- lib/active_settings/config/definition.rb
#normalize_selection(choices) ⇒ Object
in definitions we accept anything that options_for_select would normally take here we standardises on an options array-of-arrays so that it’s easier to validate input
80 81 82 83 |
# File 'lib/active_settings/config/definition.rb', line 80 def normalize_selection(choices) choices = choices.to_a if Hash === choices choices = choices.collect{|c| (c.is_a? Array) ? c : [c,c]} end |