RailsCasts Pro episodes are now free!

Learn more or hide this

Leigh Daniels's Profile

GitHub User: leighdaniels

Comments by Leigh Daniels

Avatar

 I am using Kaminari to paginate the display of messages from a database of email messages. In my Show view for an individual message I want to add Next and Previous message links that navigate to the next and previous messages in the list of messages shown on the Kaminari-paginated page. I can't figure out how, from the Show view, to access the array of records that are displayed on a particular page. The message IDs are not necessarily consecutive.
 
 The Search results are stored in @messages but I can't access that from the Show view.
 
 How can I access the array of 25 messages for a page using params[:page]?
 
 **Leigh