Implement user sign out (destroy current session)
This commit is contained in:
@@ -11,4 +11,9 @@ class SessionsController < ApplicationController
|
||||
render 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
reset_session
|
||||
redirect_to :root
|
||||
end
|
||||
end
|
||||
|
@@ -13,5 +13,7 @@
|
||||
= link_to 'Scube', root_path
|
||||
%li
|
||||
= link_to 'Playlists', playlists_path
|
||||
%li
|
||||
= link_to 'Sign out', signout_path
|
||||
|
||||
= yield
|
||||
|
Reference in New Issue
Block a user