Sha256: 099a9038d047f7bd80a151c83bbb3381a6ba00b2230de341a9546b671e2363b3
Contents?: true
Size: 398 Bytes
Versions: 12
Compression:
Stored size: 398 Bytes
Contents
class SessionsController < ApplicationController def new; end def create @user = User.find_by("LOWER(email)= ?", params[:email].downcase) if @user&.authenticate(params[:password]) session[:user_id] = @user.id redirect_to params[:return_to] || root_url else flash[:warning] = "You have entered incorrect email and/or password." render :new end end end
Version data entries
12 entries across 12 versions & 1 rubygems