Last active
November 22, 2018 16:21
-
-
Save alicethewhale/c04bedb9a85d882e2ae8e314ab3c946a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.timeline_subquery(lead) | |
select('lead_alerts.id AS id', 'lead_alerts.action AS body', 'users.first_name AS first_name', 'users.last_name AS last_name', 'lead_alerts.due_on AS date', '"lead_alerts" AS model') | |
.left_joins(:author) | |
.where(lead_id: lead) | |
End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment