jnunemaker/mongomapper — pull request #387 by brianhempel (2012-02-11 04:20:09+00:00)
Title: Delegate more methods to plucky [Fixes #379, #266]

Delegate more methods to plukcy

:distinct, :size, :reverse, :offset, :order, :empty?,
:filter, :find_one, :per_page, :ignore, :only

A few user problems are fixed by this, e.g. people wanting to write use :order.

In the `has_many` association, `size` and `empty?` need to hit the loaded association array instead of going to the database. Otherwise, documents created with `build` don't show up. I updated the tests to reflect this.

I opted not to delegate `remove` since that's covered by `.delete_all` and I guess I'm afraid of it. If you think it should be there, let me know...it's easy enough to add.