search for: last_item

Displaying 2 results from an estimated 2 matches for "last_item".

Did you mean: last_iter
2005 Dec 29
1
Paginate do a Count(*) request before...
...g to set the variables @total, @first_msg, @last_msg in the controller. (Everyone has their own style but I like to keep my controller as streamlined as I can.) Just use something like this in your view: Listing <%= @message_pages.current.first_item %> - <%= @message_pages.current.last_item %> of <%= pluralize(@ message_pages.item_count, ''message'') %> HTH, Kevin
2005 Dec 29
4
Paginate do a Count(*) request before, how access that count value.
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,