I've been told that I shouldn't use variables such as params[:user_id]
in my view files. Does the same rule apply to the session
variable?
If not, then what should I be doing? Assign it to an instance variable first and then use that in the view? This seems annoying as I would have to do it for each of my actions. I guess I could put this repetitive code in one method which gets called by all the other actions in that class.