How does one access this hash from an ActiveRecord class in the Rails console?
- by randombits
I have a simple hash I created to make it easier to do dictionary type lookups. For instance:
class Numbers < ActiveRecord::Base
MY_TYPES {
one: => 1,
two: => 2
}
end
Is it not possible in the rails console to access this hash via Numbers.MY_TYPES[:one]?