method should first be invoked on CollectionProxy

This is fix for https://github.com/rails/rails/issues/9994
Merge pull request #7 from neerajdotname/9994

method should first be invoked on CollectionProxy