Add a variable to ease code reading

This commit is contained in:
gregoirenovel 2018-10-10 10:32:01 +02:00
parent 4e2964aec3
commit 89dec3d363

View file

@ -1,9 +1,10 @@
class Users::Dossiers::InvitesController < UsersController
def authenticate_user!
session["user_return_to"] = request.fullpath
email = params[:email]
if params[:email].present? && User.find_by(email: params[:email]).nil?
return redirect_to new_user_registration_path(user: { email: params[:email] })
if email.present? && User.find_by(email: email).nil?
return redirect_to new_user_registration_path(user: { email: email })
end
super