Class: WonderfulSimpleForms::SimpleForm::EnumInput

Inherits:
SimpleForm::Inputs::CollectionSelectInput
  • Object
show all
Defined in:
lib/wonderful_simple_forms/simple_form.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



31
32
33
# File 'lib/wonderful_simple_forms/simple_form.rb', line 31

def collection
  @collection ||= enum_list
end

#enum_listObject



35
36
37
# File 'lib/wonderful_simple_forms/simple_form.rb', line 35

def enum_list
  object.class.method(attribute_name.to_s.pluralize.to_sym).call.keys
end