Topic: Pagination Idea with Scopes and Blocks  This is a rant on
the current pagination and some ideas on how to improve it. Feel
free to skip it if this stuff doesn't interest you. smile   I've
been thinking about pagination lately. I like to move complex
finds into the model but the current pagination in Rails makes
this difficult. It requires you create the Paginator object
manually. Then you have the classic problem of needing the total
count of results found without the per-page limit so the
paginator can calculate the total number of pages. This usually
requires you run two queries (one for the count and one for the
items) which leads to all kinds of duplication of search
conditions and more problems.  MySQL allows you to set
"SQL_CALC_FOUND_ROWS" in a SELECT clause to calculate the total
number of rows (without the limit) the same time you are
fetching the limit. This is excellent to give you a performance
boost, but it's not availabe to all database engines. This tells
me this should be handled in the