From cc50bed0a5b1926d51491e1668189cc9f93382ee Mon Sep 17 00:00:00 2001 From: James Mead Date: Tue, 3 Oct 2023 17:52:14 +0100 Subject: [PATCH] Use #resource vs @user in InvitationsController#create This seems more consistent with the code in the rest of this action. --- app/controllers/invitations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 865b8bb39..facb50120 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -25,7 +25,7 @@ def create self.resource = resource_class.invite!(all_params, current_inviter) if resource.errors.empty? grant_default_permissions(resource) - EventLog.record_account_invitation(@user, current_user) + EventLog.record_account_invitation(resource, current_user) set_flash_message :notice, :send_instructions, email: resource.email respond_with resource, location: after_invite_path_for(resource) else