rename username to email
This commit is contained in:
parent
7412853a3e
commit
cd40ef66c6
9 changed files with 18 additions and 13 deletions
|
@ -3,7 +3,7 @@ class SessionsController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
@user = User.find_by(username: params[:username])
|
||||
@user = User.find_by(email: params[:email])
|
||||
if @user && @user.authenticate(params[:password])
|
||||
session[:user_id] = @user.id
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue