Sha256: 6e5c9609cb9729fc44a6ed43d0cb441f601b4e1df1991b381bc46f94ffe05ead
Contents?: true
Size: 605 Bytes
Versions: 2
Compression:
Stored size: 605 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) @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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kaze-0.7.0 | stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb |
kaze-0.6.0 | stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb |