Sha256: 87d889cd89dd26d1c601eb0d181bad6b6dc763d9f873e2c22fa1853a73d6c038
Contents?: true
Size: 616 Bytes
Versions: 1
Compression:
Stored size: 616 Bytes
Contents
class Auth::AuthenticatedSessionController < ApplicationController include RedirectIfAuthenticated skip_authenticate only: %i[new create] skip_redirect_if_authenticated only: %i[destroy] layout 'guest' def new @form = Auth::LoginForm.new render 'auth/login' end def create @form = Auth::LoginForm.new params.permit(:email, :password, :remember) @form.authenticate return render 'auth/login', status: :unprocessable_entity if Current.auth.user.nil? redirect_to dashboard_path end def destroy Current.auth.logout reset_session redirect_to '/' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kaze-0.8.0 | stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb |