Commit bf3e5072 authored by Doug Stull's avatar Doug Stull Committed by Alex Kalderimis

Replace AR method with a scope in bulk create users

- fix rubocop exception
parent de4a62d8
...@@ -53,7 +53,7 @@ module Members ...@@ -53,7 +53,7 @@ module Members
if users.present? if users.present?
# helps not have to perform another query per user id to see if the member exists later on when fetching # helps not have to perform another query per user id to see if the member exists later on when fetching
existing_members = source.members_and_requesters.where(user_id: users).index_by(&:user_id) # rubocop:disable CodeReuse/ActiveRecord existing_members = source.members_and_requesters.with_user(users).index_by(&:user_id)
end end
[emails, users, existing_members] [emails, users, existing_members]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment