I have a Gallery application that has Album and Photo models.
I have the user search in the Album's show view (search in the specific album) and I store the results in a variable named @search in the show action of the controller.
I want to pass this variable to the Photo model's show page so when a user clicked on a particular picture from the Album's show page, it goes to the Photo show page for the picture and allows me to put previous and next links at the top so that i can have prev and next only change photos that are within the search results.
I am wondering how to pass the variable search in this way to make previous and next links possible in the photo model's show controller action.
Thanks! I hope this was fairly clear.