riseuplabs/crabgrass-core — pull request #23 by azul (2014-02-17 19:07:24+00:00)
Title: only paginate if posts respond_to :total_pages

We use the same helper to render posts in different places.

Some of them paginate some others don't. The latter do not have
the necessary data incl. total_pages. So if we try to paginate
them it will crash.

We used to check for the class of posts. But since will_paginates
changed this is now always a relation. It's also recommended
to test responds_to? instead of class.