Skip to content

Commit 9d240a3

Browse files
committed
ログアウトアクションを実装
1 parent 2dbee34 commit 9d240a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

depot/app/controllers/admin_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ def login
1313
end
1414

1515
def logout
16+
session[:user_id] = nil
17+
flash[:notice] = "ログアウト"
18+
redirect_to(:action => "login")
1619
end
1720

1821
def index

0 commit comments

Comments
 (0)