Displaying 20 results from an estimated 2000 matches similar to: "Problem w/ Rails 1.1.4 and pagination_links using params?"
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_links from rails.
What''s the correct way to override
2006 Jan 19
8
Pagination_links without "?page=" but with params[:id]
Hello,
With default pagination I have this :
<a href="/users/infos/3?page=1">1</a>
<a href="/users/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 ? )
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 current naming convention.....i know there must be a way to do
this....any ideas?
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
--
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,
2007 Apr 04
2
[PLUGIN] ArPaginator - Allows you to easily paginate over any existing AR queries.
The built-in Rails pagination is fairly limited...you pass in the
model name, and optionally some conditions, and it generates a
paginated query for you. This gets to be very bad if you''ve got any
custom queries.
class Company < ActiveRecord::Base
def complete_videos
Video.find :all, :conditions => "company_id=#{id} AND
status=''complete''", :order
2006 Feb 13
1
Paginate @member.items?
Is there a quick and easy way to paginate something
like @member.items (Member with has_many :items)?
Right now I do in the controller:
@item_pages, @member_items = paginate :item,
:conditions=>["member_id=?", @member.id],
:per_page=>25,
:order=>''datetime desc''
It''d be more DRY if this was possible:
@item_pages, @member_items = paginate
2006 Jan 22
3
Formatting input/output of a text box
Hello,
What''s the best way to handle formating of a text_area? I have a text_area
in my rails app where people can leave comments and I''d like to
automatically convert the line breaks into <br /> tags, or just simply wrap
a whole paragraph in <p></p> tags. I''m currently doing the following in my
comments controller to insert line breaks when the user
2005 Dec 19
2
Advanced search/filter use cases
I''ve been working on an application lately that has a lot of advanced
search and filtering functionality (with ranges and substring searches
for each attribute). Despite being a pretty common use case, this isn''t
supported particularly well by any framework I''ve used, including Rails.
I''d like to fix that. :)
Right now, my major pet peeves are:
1. Long,
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 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
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 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
2006 Aug 03
2
pagination with customer list.rhtml
(To preface this - you can just imagine I am making the cookbook from
the Rolling with Ruby on Rails tutorial)
I have made a customer list view (list.rhtml), so that I could include
attributes from multiple database tables. This works fine, however, the
list page no longer paginates (i.e. does limit the item list to 10 items
at a time, with a 1, 2, 3... links at the bottom)
I am trying to
2006 Jul 07
0
Pagination and accessing old objects/parameters
Hi all,
I am trying to use the pagination capabilities in a search tool that I
have. A search view takes several parameters provided in text input and
drop down boxes. Submitting the form causes a POST call 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
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
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...
To get error messages for my form to show up I have to repeat myself in
the controller so that the render of the view including error messages
show up.
-------------------------
My Controller:
-------------------------
class ClientsController < ApplicationController
#---- index --------------------------------
def index
list
render :action => ''list''
end