-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Refer to MONGOID-5660 for context.
Hash#to_criteria is a kernel Monkey patch that converts a Hash to a Criteria by currying its key-values to an initialized Criteria class. It looks like it was done in order to support passing in a hash as an arg to Criteria.merge!, there's not a major use for it otherwise (Criteria also doesn't define #to_h)
PR raised: https://github.com/mongodb/mongoid/pull/5717