search for: howtopagin

Displaying 8 results from an estimated 8 matches for "howtopagin".

2006 Jan 31
6
Pagination - why is it this hard?
...;/a> <% end %> <%= link_to "Next", { :page => @person_pages.current.next } if @person_pages.current.next -%> Resources I''ve used to (it seems) no avail: http://api.rubyonrails.com/classes/ActionController/Pagination.html http://wiki.rubyonrails.com/rails/pages/HowtoPagination http://bigbold.com/snippets/posts/show/389 http://railsexpress.de/blog/articles/2005/11/04/faster-pagination
2006 Jun 07
3
Pagination
Does anyone know if there''s a plugin to do pagination numbers like: Prev 1 2 3 4 5 etc Next And automatically move through the pages? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Jan 06
1
Re: Rails Digest, Vol 16, Issue 132
This page should be helpful on pagination: http://wiki.rubyonrails.com/rails/pages/HowtoPagination Also, I don''t totally understand your model but I think you maybe making the SQL harder than you need. find_by_sql feels like overkill in this case. Either a simple find with conditions or something like "user.color.name" might do the trick for you. Kevin
2005 Dec 29
1
Paginate do a Count(*) request before...
...ry. If it''s a large data set do the COUNT and then only find the records you want which will save overhead by retrieving a small amount of data even though it uses two queries. I''ve put a page on the Rails Wiki which might help you: http://wiki.rubyonrails.org/rails/pages/HowtoPagination To Adam, one tip about your solution. Once you have a Paginator object that the view can see, you can use its 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 bu...
2006 Jan 24
1
Pagination
Hello, maybe that I''m a stupid, but I don''t know how I can working with pagination. In all examples is written (for example) next: def user_list @user_pages, @users = paginate(:users, :order_by => ''name'') end So, it''s OK (as a scaffold) for all set of users. But I need a little other functionality. For example I need paginate only a little bit
2006 Apr 06
6
pagination question
i''ve figured out how to use the next and previous links with the paginator class but now i''m trying to figure out how to display all the page numbers in between. looking through the rails api, i found paginator.each() but i''m not sure how to use it, or if that''s even what i am looking for. also, is there a way to limit the amount of pages like some sites
2006 Feb 23
6
Search Forms with Pagination
Hi there everyone, I''ve recently moved to RoR and am still struggling with the basics of what used to be second nature in php, so on with my question: I have a database with products, and I need to create a search form that paginates the results. What I have so far in my controller is: def list # If the values are nil, then set them, otherwise wrap them in % # Also,
2006 Mar 21
2
Rails newbie can''t initialize a new Paginator object
Hi all, I''m using ruby 1.8.2-15 and a recent rails 1.0 download. I''m trying to implement the Classic/Custom pagination in a list action. Here''s my code: def list getSearchTerms # NOTE: @params[:search_results] is an Array of product_data objects # returned by a search action. @results = @params[:search_results] if @results.nil? then # The default