Hi, I am using "will_paginate" for pagination. For that I have written following code.
@selected_photos=BookPhoto.find(:all, :conditions=>["id=?", params[:id]]) @book_phot...@selected_photos.paginate :per_page => 3, :page => params[:page] It is working fine. I have problem with this that every time it is retrieving all records satisfying the where condition. I don't want like that. It should fetch only three records from the database. How should I do that? Any help will be appreciated. Thanks, Tushar. -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

