Ruby on rails session = nil

Posted by Mathieu on Stack Overflow See other posts from Stack Overflow or by Mathieu
Published on 2009-10-29T23:22:53Z Indexed on 2010/04/02 11:33 UTC
Read the original article Hit count: 413

Filed under:
|
|
|
|

Hi,

In a controller I have 2 actions

def action1
  session[:test]="test"
  render :text => session[:test]  # output test
end

def action2
  render :text => session[:test]  # output nil
end

I perform first action1 so the session is set Then I perform action2 but session[:test] is nil

So what am I doing wrong?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about session