search for: message_pag

Displaying 3 results from an estimated 3 matches for "message_pag".

Did you mean: message_part
2005 Dec 29
1
Paginate do a Count(*) request before...
...methods to get the number of items while in the view instead of having 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
0
strange output in http header
...? items_per_page = params[:items_per_page].to_i end @conditions = "parent_id IS NULL" logger.info params[:id] unless params[:id].nil? logger.info "creating discussion" @conditions += " AND creation_disc_id = "+params[:id] @discussion = Discussion.find(params[:id]) end @message_pages = Paginator.new self, Message.count( @conditions ), items_per_page, @params[''page''] @messages = Message.find(:all, :conditions => @conditions, :order => ''creation_date DESC'', :limit => @message_pages.items_per_page, :offset => @message_pages.current...
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,