Closed flexoid closed 11 years ago
Allow to pass array of fields as argument to only and without methods
only
without
Now you can call this methods in two ways:
query.only(:first, :second) query.without(:first, :second)
query.only([:first, :second]) query.without([:first, :second])
Also it affects mongoid. It was possible to call exclusively only with array because it's overriden in Criteria to specify additional behavior, but without wasn't. Now you can use both of them with array argument.
Pulled in, thanks.
Changes Unknown when pulling d84ac6150ede3728d8c6609020d36b4e7728a0b9 on flexoid:only-and-without-with-array-as-arg into \ on mongoid:master**.
Allow to pass array of fields as argument to
only
andwithout
methodsNow you can call this methods in two ways:
query.only(:first, :second) query.without(:first, :second)
query.only([:first, :second]) query.without([:first, :second])
Also it affects mongoid. It was possible to call exclusively
only
with array because it's overriden in Criteria to specify additional behavior, butwithout
wasn't. Now you can use both of them with array argument.