BigW Consortium Gitlab
Previously we'd use "event.author_email" which translates to "event.author.email". This would result in an extra query being executed _for every event_ just to get the same author's Email address. Instead of doing all this useless work we can just pass the User object returned by "event.author" since: 1. This allows us to re-use the user object's Email address. 2. Authors are eager-loaded, so this doesn't cause any N+1 queries.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
event | Loading commit data... | |
_commit.html.haml | Loading commit data... | |
_event.atom.builder | Loading commit data... | |
_event.html.haml | Loading commit data... | |
_event_issue.atom.haml | Loading commit data... | |
_event_merge_request.atom.haml | Loading commit data... | |
_event_note.atom.haml | Loading commit data... | |
_event_push.atom.haml | Loading commit data... | |
_event_scope.html.haml | Loading commit data... | |
_events.html.haml | Loading commit data... |