mongoid-enum
mongoid-enum copied to clipboard
Change in criteria prefixing
I've just updated to mongoid5 and mongoid-enum 0.4, and noticed a change in how criteria is built.
In emongoid-enum 0.2 Model.where(enum_name: :value) would translate to the mongo query for {_enum_name: "value"} that is, it added the field prefix to the query. That doesn't seem to be working anymore.
Is this the expected behaviour?
I also noticed that enum_changed? is now _enum_changed? is this on purpose or a regression?