Hi,
I am trying to get paginating to work with jQeury. I am using the will_paginate gem. It works normally (with no javascript). I tried following a railscast (http://railscasts.com/episodes/174-pagination-with-ajax) but I am still having a problem.
show.js.erb
$('#comments').html("<%= escape_javascript(render "comments/comment.html.e...
Hi,
I'm new to rails and I want to know about paginate method in rails. How can I do pagination in rails.
Thanks
...
I'm trying to get will paginate to link to my nested route instead of the regular posts variable. I know I'm supposed to pass some params to paginate but I don't know how to pass them.
Basically there is an array stored in @posts and the other param paginate has access to is category_id.
The nested route is /category/1/posts but hittin...
The following result sets work well with will_paginate:
Members.all(:limit => 5).paginate(:page => params[:page])
Members.all(:conditions => ["member_no < 6"]).paginate(:page => params[:page])
Members.all.paginate(:page => params[:page])
The following does not:
Members.all(:conditions => ["member_no IN (?)", [1, 2, 3, 4, 5]]).paginat...
Hi,
I'm struggling to paginate using mongoid. I'm able to call paginate on my collection object like
@results = @collections.paginate :page => 1, :per_page => 10
but how it needs to be referred in view?
In my view I have rendered the collection in partial as
<%= render :collection => @collections, :partial => collect.xml %>
<%= will...
hi guys, my search results are stored in the @searchresults variable as subarrays - for example it has 3 sub-class of results books, people, carnames, such that each of this results are available in the search result as @searchresults[:books_results] etc,.
I need some help on how to apply the will_paginate for these sections (books, peo...
Hello!
I have a photo_album
which has several photos, IDs: 4,9,10,11,31 -- all for photo_album:3
I have the following for my DEF SHOW in my Photos controller:
@photo = @photoalbum.photos.order("created_at ASC").paginate :page => params[:page], :per_page => 1
Problem is, if the URL is: /photo_albums/3/photos/10 The code above starts ...