Created
September 12, 2013 19:32
-
-
Save mholubowski/6542700 to your computer and use it in GitHub Desktop.
This file contains 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
NotificationSubscription.where(confirmed: true) | |
.joins(property: :feedback_inputs) | |
.where("feedback_inputs.created_at >= :cutoff", {cutoff: 1.hour.ago}) |
Well right now you have no tie to a user - is that what you're asking about?
NotificationSubscription.where(confirmed: true)
.joins(property: :feedback_inputs)
.where("feedback_inputs.created_at >= :cutoff", {cutoff: {notification_subscription: :last_email_sent_at}})
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to make :cutoff dynamic, depending on a column in NotificationSubscription?
So {cutoff: NotificationSubscription.last_email_sent_at}