[Rails] Paginate do a Count(*) request before, how access that count value.

Thibaut Barrère thibaut.barrere at gmail.com
Thu Dec 29 10:04:48 GMT 2005


Hi Mathieu

maybe you could use a cached counter value in the database, as shown in the
rails-blog-in-15-minutes-video ? (a bit different from what you exactly
describe, but less expensive as well)

hope this helps

Thibaut

On 29/12/05, Mathieu Chappuis <mathieu.chappuis.lists at gmail.com> wrote:
>
> Hello,
>
> AV::paginate query first by a count, how access this value in the
> controller or view ?
>
> Why ?
>
> Because I'll like to display the total number or records found w/o
> doing another expenssive Count.
>
> Thanks,
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20051229/88fde4cf/attachment-0001.html


More information about the Rails mailing list