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



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

def collection
  @collection ||= enum_list
end

#enum_listObject



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

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