Move find_or_Initialize_by to model layer for invites to resolve rubocop exception
The following discussion from !151796 (merged) should be addressed:
-
@project_278964_bot_445da1b60fc7336b6b6776383134d10f started a discussion: (+1 comment) source.members_and_requesters.find_or_initialize_by(invite_email: invitee).tap do |record| # rubocop:disable CodeReuse/ActiveRecord -- TODO: Reason why the rule must be disabled
Consider removing this inline disabling and adhering to the rubocop rule.
If that isn't possible, please provide the reason as a code comment in the same line where the rule is disabled separated by
--
. See rubocop best practices.