module EnumRecords::ActiveRecord::InstanceMethods

Public Instance Methods

enum_attributes() click to toggle source

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)

# 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