Class: Madmin::Fields::Enum

Inherits:
Madmin::Field show all
Defined in:
lib/madmin/fields/enum.rb

Instance Attribute Summary

Attributes inherited from Madmin::Field

#attribute_name, #model, #options, #resource

Instance Method Summary collapse

Methods inherited from Madmin::Field

#default_index_attributes, field_type, #initialize, #required?, #searchable?, #to_param, #to_partial_path, #value, #visible?

Constructor Details

This class inherits a constructor from Madmin::Field

Instance Method Details

#options_for_select(record) ⇒ Object



4
5
6
# File 'lib/madmin/fields/enum.rb', line 4

def options_for_select(record)
  model.defined_enums[attribute_name.to_s].keys
end