app/helpers/sessions_helper.rb
# Logs out the current user.
Logs out the current user.
Logs out the current user .
def log_out
    session.delete(:user_id)
    session.delete(:user_role)
    @current_user = nil
  end
def log_out session . delete ( :user_id ) session . delete ( :user_role ) @current_user = nil end
Logs out the current user.
Logs out the current user .