Might not be the prettiest, but you could do this:

modify your index.html.erb so that you're giving a name attribute each
item in your list.

<tr>
<td><%= link_to(item.name, :name => item.id) %></td>
</tr>

Then modify the 'back' link in the action in question like this:
<%= link_to 'Back', items_path + "#[email protected]}" %>


better yet, roll it into a helper. :)

On Dec 18, 9:57 pm, 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 viahttp://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to