Sha256: 45c472ca494db8cde59c73485f59e4e0c754ed9c97c3e35751a5fe93900a0a4c
Contents?: true
Size: 352 Bytes
Versions: 12
Compression:
Stored size: 352 Bytes
Contents
class SessionsController < ApplicationController before_action :require_no_user, except: [:destroy] def new end def create user = User.authenticate(params[:email], params[:password]) if user set_current_user(user) redirect_to root_url else render :new end end def destroy reset_session redirect_to root_url end end
Version data entries
12 entries across 12 versions & 1 rubygems