This gives us more flexibility and allows us to use password authentication later. Also we don't need to build the login functionality ourself.
13 lines
153 B
Ruby
13 lines
153 B
Ruby
class SessionsController < ApplicationController
|
|
|
|
def new
|
|
reset_session
|
|
end
|
|
|
|
def destroy
|
|
reset_session
|
|
redirect_to root_url
|
|
end
|
|
|
|
end
|