views:

41

answers:

1

Can I have a link that would add something to the session hash? For example if I had a link, can it do this when clicked:

session[:items] << item

I'll probably have to have the link trigger a JS file for that action, so I can update the session when the user clicks the link.

+1  A: 

Ok, what I did, in case someone else runs across, I executed this line in my controller, for example this would be if we added something to our params.

session[:items] << Item.find(params[:id])
Joseph Silvashy
This is really the only way to do it.
EmFi