I have some photos that are split on successive pages through will_paginate plugin. When you open a photo and then return to all photos using a link, you always return to the first page (e.g. the photo is displayed on page 5, you open the photo, click a link to show all photos and expect that you are on page 5 again, but you are on page 1).
Now, is there any method to get the page number to which a photo belongs to?
I tried to pass a GET parameter, but this only works if the user doesn't perform any more actions (e.g. post a comment, edit photo, ecc.).