Refacto check_invite! after registration for User.

This commit is contained in:
Xavier J 2017-01-13 11:19:29 +01:00
parent f5f5ef1a0d
commit 154e4f3c10

View file

@ -68,7 +68,6 @@ class Users::RegistrationsController < Devise::RegistrationsController
private private
def check_invite! user def check_invite! user
Invite.where(email: user.email) Invite.where(email: user.email).update_all user_id: user.id
.each { |invite| invite.update user: user }
end end
end end