Greetings I'm having some issues with the use of Enum as a type. I declare it in the model like this: <pre> <code> class Bong property :label, Enum[:a, :b, :c] end </code> </pre> After that I create an instance: <pre> <code> a = Bong.create(:label => :a) a.label #=> :a a.label = :b a.label #=> :b a.id #=> 1 </code> </pre> But later, as I fetch it, I get the strangest behaviour: <pre> <code> a = Bong.get(1) a.label #=> nil </code> </pre> can you tell me why this happens?
Greetings
I'm having some issues with the use of Enum as a type. I declare it in the model like this:
After that I create an instance:
But later, as I fetch it, I get the strangest behaviour:
can you tell me why this happens?