Why not pass a "to" parameter that points to the page where you want to go back? For example, clicking on an item to see the show view leads you to:
http://domain.com/items/1?to=http://domain.com/items?page=2 Of course, it'll appear escaped. >From there you can harvest the parameter and let your back button be: link_to "Back", params[:to] || items_path Check out railscasts too. Ryan Bates made an episode all about back. Ramon Tayag On Fri, Dec 19, 2008 at 11:57 AM, Ken Wagner <[email protected]> wrote: > > In Rails I have a DB Table index.html.erb view. It has 100's of items. > > When I gen via scaffold I get index, show, edit, update, etc view. > > But when I page down several pages, use the "show" link and then the > "back" link I do not go back to where I was on the index view. > > Instead, I go back to the TOP of the index not the place where I clicked > on the "show" link. > > I must then page down several times to get to where I was. > > On the other hand, using the browser's back function take me right back > to where I was. No paging down needed again. > > Can this "back" browser function be invoked from a Rails "back" link? > > > TIA > > Ken > -- > 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 -~----------~----~----~----~------~----~------~--~---

