ruby on rails - session[:key] = value doesn't work -


I am trying to use session data in my application and for some reason I have some setup not correct. / P>

code:

  session [: key] = some_value  

generates the following error:

 < An error occurred while evaluating the code> error. []  

There is no problem with the session of other controllers, so I'm guessing that I miss some basic configuration things somewhere.

Okay, I think I have come to know it now outside. My situation was a bit more complex which is my example. I actually had the following:

  session [: chat_history] [chat.from.id] || = []  

So I had an error in the double array I added the following:

  session [: chat_history] || = []  

The problem is the first time I did, I have it before a before_filter method apparently the session object is already zero before, at least the way I have my application setup

So I took the initiator to such methods which actually use the session and life is better again.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -