Method: Commit#lazy_author
- Defined in:
- app/models/commit.rb
#lazy_author ⇒ Object
300 301 302 303 304 305 306 307 308 309 310 |
# File 'app/models/commit.rb', line 300 def BatchLoader.for(&.downcase).batch do |emails, loader| users = User.by_any_email(emails, confirmed: true).includes(:emails) emails.each do |email| user = users.find { |u| u.any_email?(email) } loader.call(email, user) end end end |