Unable to set/use session variables in ruby on rails controller

后端 未结 3 2003
名媛妹妹
名媛妹妹 2021-01-12 08:52

Can somebody tell me the right way to set/use session variables in a ruby on rails application from scratch. I am not able to set/use a session variable in my controller bet

3条回答
  •  悲哀的现实
    2021-01-12 09:09

    As a rule of thumb, in rails we create a method in ApplicationController, called current_user In this free RailsCast, you see exactly are you need:

提交回复
热议问题