The code for calling session in the rails controller is as follows:
session [: cart}] ...
Why is there no @ sign in front of the session.
Similarly, flash and logger have the same problem. Are they local, instance or constant variables?
Also not recommended is @params, you can check the documentation for details. In addition, to remind the host, session['user'] and session[:user] will return two different references...