invite: clarify logic of sign-up redirection
This commit is contained in:
parent
a63e035daf
commit
bc55afba51
1 changed files with 4 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
|||
class Users::Dossiers::InvitesController < UsersController
|
||||
def authenticate_user!
|
||||
session["user_return_to"] = request.fullpath
|
||||
return redirect_to new_user_registration_path(user_email: params[:email]) if params[:email].present? && User.find_by(email: params[:email]).nil?
|
||||
|
||||
if params[:email].present? && User.find_by(email: params[:email]).nil?
|
||||
return redirect_to new_user_registration_path(user_email: params[:email])
|
||||
end
|
||||
|
||||
super
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue