search for: pagination_link

Displaying 20 results from an estimated 28 matches for "pagination_link".

Did you mean: pagination_links
2006 Apr 27
2
How to override pagination_links method
I intend to override pagination_links method. I added following lines of code in application_helper.rb module ActionView module Helpers def pagination_links(paginator, options={}, html_options={}) raise("boom!!") end end end But my code is not executing my code. The view is still using the method pagination...
2006 Jul 23
2
pagination_links and friendly urls
my pagination_links seems to auto generate the links using the current controller, action and id. The page they''re appearing on however have a friendly url I have created. I want to be able to make pagination urls generated by pagination_links "user friendly" as well so that they match my cur...
2006 Jul 12
2
Problem w/ Rails 1.1.4 and pagination_links using params?
I just installed version 1.1.4 and it seems like I started having problems with the pagination_links method. When I call the method using something like this (using the :params option--and this seems to be the problem), <%= pagination_links @todo_pages, :params => params %> then it duplicates part of the controller in the generated url. For example, before one of my paginator links...
2006 Jan 19
8
Pagination_links without "?page=" but with params[:id]
.../infos/3?page=3">3</a> but i need this : <a href="/users/infos/1">1</a> <a href="/users/infos/3">3</a> I need to remove the "?page=" parameters and rewrite a little the link ( with a link_to ? ) How can I do this ? Need to use pagination_links_each ? Use options ? Thanks controller : *** @paginate_pages, @users = paginate :users, :per_page => 1, :order => "id DESC" view: *** <%= pagination_links @paginate_pages, :window_size => 1 %> in html: *** <a href="/users/infos/3?page=1">1</a...
2006 Jan 31
0
pagination_links - change anchor size?
Has anybody figured out a way to change the anchor size in pagination_links? I''d like links like: 1 2 3 ... 7 8 9 10 11 ... 15 16 17 Thanks! csn -- Posted via http://www.ruby-forum.com/.
2006 May 14
3
Beginner question on paginate with params and conditions
I am trying to do a simple search by product name. The first page returns fine, but when I try to go to any other pages of the search results, I lose the original search parameters from my search form and get NilClass errors. Here is the code in my controller: namesearch = "%" + params[:name].strip + "%" @product_pages, @products = paginate :product,
2006 Jan 26
21
pagination_links help
I want append custom query parameters to my pagination links, like ?page=1&foo=bar. I can''t quite figure out how to do this with the pagination_links helper, although I believe the API says you should be able to: pagination_links(paginator, options={}, html_options={}) options are: :params: any additional routing parameters for page URLs Has anyone tried this? thanks, jeff -- Posted via http://www.ruby-forum.com/.
2006 Mar 31
4
Question about pagination
Hi! I''ve got a list of project on the main page and if one of them is selected i render a partial using ajax with data of selected project. How to create links to next/previous project using pagination? -- Posted via http://www.ruby-forum.com/.
2006 Feb 13
1
Paginate @member.items?
...ssible: @item_pages, @member_items = paginate @member.items, :per_page=>25, :order=>''datetime desc'' And even more so if it could all be done in the template: <% for item in @member.items(:limit=>25, :offset=>params[:page]*25) %> ... <% end %> <%= pagination_links @member.items, offset, limit, ... %> Any ideas? Thanks, csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2006 Jan 28
8
how to pass search parameters to pagination links
I have a search page with a text_field as below <%= text_field ''program'', ''program_name'' %> After I perform the search in my controller I go to a search results view which shows search results and uses Rails pagination. Now how to pass the search paramters (i.e. params[:program][:program_name] in my controller) to the pagination links (next and
2007 Apr 04
2
[PLUGIN] ArPaginator - Allows you to easily paginate over any existing AR queries.
...it easily. ArPaginator.new takes a hash with two keys - :model and :controller. :model is the underscored class name to be paginated. So in this case AR ultimately calls Video.find, so we need to specify :video as the model. The :controller option is used to specify the controller so the call to pagination_links @video_pages works fine. The API is a bit messy, and I''ll be cleaning it up soon hopefully...but the important part - easily paginating your existing query methods - is taken care of. One limitation is that you can''t paginate over methods that use the association proxy. So if...
2006 Aug 07
4
Problem with Pagination
Hi Guys, I am trying to paginate the results from a search. When I use actual constants in the search conditions, it works fine: def query @k2_result_pages, @k2_results = paginate (:k2_results, :conditions => [''e_date >= ? AND e_date <= ?'', ''2006-07-12'', ''2006-08-12''],
2006 Jun 21
7
acts_as_taggable and paginate?
Hi there, I''ve been trying to paginate over a list of members that all share a tag in common using the acts_as_taggable plugin. The regular way of paginating over a collection doesn''t seem to work with acts_as_taggable. Here''s what my method looks like that takes in a tag name, finds all the members that share the tag and then displays all the members. Nothing too fancy
2005 Dec 19
2
Advanced search/filter use cases
...a, and also of doing a substring "keyword" search across several named fields. All of this would be made to work with paginate as well. On the view side, a simple helper could write out column header links that would rerun the search with the correct order_bys. A switch on the existing pagination_links helper would tell it to include all of the criteria params from the original search. A basic search method/page could be generated as part of scaffold (for those who use it as a reference). Has anyone already done something similar? Or solved this problem in a more elegant way? If so, I'...
2006 Jul 07
0
Pagination and accessing old objects/parameters
...l to :action => ''search''. I generate some DB conditions based on the parameters and do a paginate. Everything gets shuttled off to the view again and things get rendered nicely... at least the first time. The problem arises when the user clicks on one of the links generated by pagination_links. This generates a GET request back to :action => ''search''. All my search parameters from the input boxes and drop-downs that I used to filter the DB query are lost. I imagine that there must be a simple way to get at what I lost so that I can do a pagination again, only for a...
2006 Apr 06
0
Keeping sql query in session hash
Hi! Could it be somehow dangerous or is not generally recommended? I''m having troubles with paginating search results. I don''t want to resend conditions parameters in every pagination link (next, previous, pagination_links) and build query every time the search action is executed. I can''t be sure which conditions will be present and which not, so it all could get quite complicated. I just thought that i could save sql query into session hash and if user clicks one of pagination links (so it will be requ...
2006 Apr 06
1
Rendering partials with pagination
I currently have a call to this action, which I''d like to paginate: def get_words @catid = params[:category] @words = Category.find(@catid).words render :partial => "word_display", :collection => @words end As you can see, a word_display partial is rendered for each word. If I add the pagination call (getting the links object), how can I then get
2006 Apr 10
0
Rails form error message oddness...
...on=> "new" %> <% for client in @clients -%> <%= render(:partial => "client_list", :object => client) %> <% end -%> <%= end_form_tag %> <div id="pageNavigation" class="clear"> <%= pagination_links(@client_pages) %> </div> </div> -- Posted via http://www.ruby-forum.com/.
2006 Mar 13
1
Styling pagination links ?
Hello, How to style the pagination links ? I simply try to set the number of the current page to another color. But I have the "..." also colored. Paginator have options to style ? Thanks
2006 Mar 23
0
Ajax and Rails Problem
...</table> <% end %> <% end %> <p align="center">&nbsp;</p> <p align="center">&nbsp;</p></td> </tr> <tr> <td><%= pagination_links(@wine_pages) %></td> </tr> </table></td> </tr> </table> </span> -- Posted via http://www.ruby-forum.com/.