session[:message]=nil
Is this is the best way to destroy a session variable.
Note: *I dont want to clear all the session variables like reset_session do.*
session[:message]=nil
Is this is the best way to destroy a session variable.
Note: *I dont want to clear all the session variables like reset_session do.*
session.delete(:message)
In general, session variable is SessionHash object, which is inherited from hash.