Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Enums are nil when an already created object is fetched #61

@HoneyryderChuck

Description

@HoneyryderChuck

Greetings

I'm having some issues with the use of Enum as a type. I declare it in the model like this:


class Bong
property :label,  Enum[:a, :b, :c]
end

After that I create an instance:


a = Bong.create(:label => :a)
a.label #=> :a
a.label = :b
a.label #=> :b
a.id #=> 1

But later, as I fetch it, I get the strangest behaviour:


a = Bong.get(1)
a.label #=> nil

can you tell me why this happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions