Created
March 2, 2016 21:11
-
-
Save dereklucas/9967b18b69150c7604d8 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
scope :approved_for_slideshow, ->{ | |
includes(:promo). | |
where('promos.show_in_slideshow is not false'). | |
where('approved_for_slideshow_at is not null') | |
} | |
----- vs ----- | |
scope :approved_for_slideshow, ->{ | |
where('approved_for_slideshow_at is not null') | |
} | |
scope :including_slideshow_promos, ->{ | |
includes(:promo). | |
where('promos.show_in_slideshow is not false') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment