Sha256: 8318b818c8ec0651a1bcf74669b5435f5183b48b9a6218f6d560196e7a605bef
Contents?: true
Size: 406 Bytes
Versions: 9
Compression:
Stored size: 406 Bytes
Contents
class SessionsController < ApplicationController def new end def create @user = User.find_by("LOWER(email)= ?", params[:email].downcase) if @user && @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
9 entries across 9 versions & 1 rubygems