-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Query
-
Labels:None
Currently Mongoid monkey patches symbol with `#in`, `#lt`, `#elem_match`, etc.
As an example:
Customers.where(:name.in => ["Bob", "David"])
Mongoid also provides two other equivalent ways of doing this:
Customers.any_in(name: ["Bob", "David"])
Customers.where(name:
)
I think it is not good to monkey patch a kernel object like Symbol. This could be extracted out to a gem for users who want to keep it, but it should not be in Mongoid core.
Propose to deprecate with warning in Mongoid 7.2 and remove entirely in Mongoid 8.0.