mongoid / origin

A Ruby DSL for building MongoDB queries
http://mongoid.org/en/origin/index.html
MIT License
62 stars 29 forks source link

Array of fields as argument to only and without #55

Closed flexoid closed 11 years ago

flexoid commented 11 years ago

Allow to pass array of fields as argument to only and without methods

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.

durran commented 11 years ago

Pulled in, thanks.

coveralls commented 10 years ago

Coverage Status

Changes Unknown when pulling d84ac6150ede3728d8c6609020d36b4e7728a0b9 on flexoid:only-and-without-with-array-as-arg into \ on mongoid:master**.