Method: ActiveSettings::Config::Definition#selection

Defined in:
lib/active_settings/config/definition.rb

#selectionObject

Returns the list of possible values for this config entry in a form suitable for passing to options_for_select. if :select_from is a proc it is called first with no arguments and its return value passed through.



67
68
69
70
71
72
73
74
75
# File 'lib/active_settings/config/definition.rb', line 67

def selection
  if selector?
    choices = select_from
    choices = choices.call if choices.respond_to? :call
    choices = normalize_selection(choices)
    choices.unshift ['","'] if allow_blank?
    choices
  end
end