lib/tachiban.rb
# The logout method sets the current user in the session to nil
# and performs a redirect to the redirect_url which is set to
# /login, but can be overwritten as needed with a specific url
# by setting a new value for @logout_redirect_url.
The logout method sets the current user in the session to nil
and performs a redirect to the redirect_url which is set to
login, but can be overwritten as needed with a specific url
by setting a new value for @logout_redirect_url.
The logout method sets the current user in the session to nil and performs a redirect to the redirect_url which is set to login but can be overwritten as needed with a specific url by setting a new value for @logout_redirect_url .
def logout
      session[:current_user] = nil
      session.clear
      @logout_redirect_url ||= '/login'
      redirect_to @logout_redirect_url
    end
def logout session [ :current_user ] = nil session . clear @logout_redirect_url ||= '/login' redirect_to @logout_redirect_url end
The logout method sets the current user in the session to nil
and performs a redirect to the redirect_url which is set to
login, but can be overwritten as needed with a specific url
by setting a new value for @logout_redirect_url.
The logout method sets the current user in the session to nil and performs a redirect to the redirect_url which is set to login but can be overwritten as needed with a specific url by setting a new value for @logout_redirect_url .