Last active
August 29, 2015 13:58
-
-
Save vladimir-e/10261039 to your computer and use it in GitHub Desktop.
Find record with zero has_many records associated #rails #activerecord (http://stackoverflow.com/questions/9613717/rails-find-record-with-zero-has-many-records-associated)
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
Photoset.includes(:photos).where(photos: {photoset_id: nil}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment