ryanb/cancan — pull request #813 by tmikoss (2013-01-29 11:30:22+00:00)
Title: load_collection? triggers sql query on inherited resources

When `resource_base` is a `ActiveRecord::Associations::CollectionProxy` (common case - inherited resources) `resource_base.respond_to?` will actually execute the query, due to it [being overwritten here](https://github.com/rails/rails/blob/3-2-stable/activerecord/lib/active_record/associations/collection_proxy.rb#L71).

This presents a problem when working with big data sets + pagination, since all the records will be loaded in memory regardless of how the collection is paginated afterwards.

Rails version: 3.2.11
CanCan version: 1.6.8