in order to use will paginate i have update my rails app from 1.2.3 to 1.2.6 but i have the same pagination problem when i was use rails 1.2.3 that page counted normaly ,but it showes all records on the same page this is the code in my admin_controller: def list @exams = Exam.paginate :page => params[:page], :per_page => 10 end this is in my view <%=will_paginate @exams%> pleas help me . -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have used will_paginate with Rails 1.2.3, 1.2.6, and 2.0.2. See if
adding '':all'' does anything for you:
@exams = Exam.paginate(:all,
:page =>
params[:page],
:per_page => 10)
I assume that you have more than 10 exam records. If this doesn''t
help, please provide any log info that might help.
-Kyle
On Feb 23, 12:11 am, Rustam Mamat
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> in order to use will paginate i have update my rails app from 1.2.3 to
> 1.2.6
> but i have the same pagination problem when i was use rails 1.2.3 that
> page counted normaly ,but it showes all records on the same page
> this is the code in my admin_controller:
> def list
> @exams = Exam.paginate :page => params[:page], :per_page => 10
> end
> this is in my view
> <%=will_paginate @exams%>
> pleas help me .
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
i have added :all ,and it works .actually i have done it on view side before you mention it ,this was my mistake .thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---