What is the best way to clear a session variable in rails?
session[:message] = nil
Is this is the best way to destroy a session variable.
Note: I don't want to clear all the session variables like reset_session
does.
session.delete(:message)
In general, session variable is SessionHash
object, which is inherited from hash.