I have the follow model using enumerize gem:
class Event < ActiveRecord::Base
extend Enumerize
enumerize :code, in: {dummy: 0, none: 1, panic: 2 }
end
This rabl file returns the strings "dummy", "none" and "panic:
object @event
attributes :code, :address...
And I need to return the integer values of :code.