Rails 3.1.3

I'm having difficulty understanding 'session', which is a way to
maintain some data even when the page reloaded (or jumped and came
back), if I understand it correctly.

Basically, what I wanna do is to simply keep an integer value, stored as
an instance variable, after jumping to another page and coming back to
where I was.  But do so, by passing the value from one action to
another.

say I have an action,

def jump_to
  @order = 1234
  session[:value] = @order
end

this action, 'jump_to', redirects to a different page(different domain),
from which one can come back to the original domain but a new page,
having the action

def come_back
  @order = session[:value]
end

But @order seems empty.  Maybe I am not defining the session value
properly.

Could anyone help me out?

soichi

-- 
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.

Reply via email to