mongoid-enum icon indicating copy to clipboard operation
mongoid-enum copied to clipboard

Change in criteria prefixing

Open p3drosola opened this issue 10 years ago • 1 comments

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?

p3drosola avatar Feb 12 '16 01:02 p3drosola

I also noticed that enum_changed? is now _enum_changed? is this on purpose or a regression?

p3drosola avatar Feb 12 '16 02:02 p3drosola