Module: EnumRecords::ActiveRecord::InstanceMethods
- Defined in:
- lib/enum_records.rb
Instance Method Summary collapse
-
#enum_attributes ⇒ Object
return this instance enum atttributes as were passed at enum definition note that all atttributes are returned (both database and non database).
Instance Method Details
#enum_attributes ⇒ Object
return this instance enum atttributes as were passed at enum definition note that all atttributes are returned (both database and non database). note that database atttribute value can be different from enum attribute value (because it was changed in db by someone else)
46 47 48 49 |
# File 'lib/enum_records.rb', line 46 def enum_attributes enum_column_name = self.class._enums[:column_name] self.class._enums[:definitions][self.send(enum_column_name)] end |