Skip to content

Commit

Permalink
Use #resource vs @user in InvitationsController#create
Browse files Browse the repository at this point in the history
This seems more consistent with the code in the rest of this action.
  • Loading branch information
floehopper committed Oct 4, 2023
1 parent ed86578 commit cc50bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/invitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc50bed

Please sign in to comment.