diff options
| author | mo khan <mo@mokhan.ca> | 2013-07-01 22:55:07 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-07-01 22:55:07 -0700 |
| commit | bbb9083127bde8deac283bf159cda0f8a76ceb68 (patch) | |
| tree | 9fc365d0a74300b8b196205fe1a5f43b411d5168 /app | |
| parent | f48ccdbf174b28f5bc1d2fddd71dfb2fed9337cc (diff) | |
filter out cakes with no photos
Diffstat (limited to 'app')
| -rw-r--r-- | app/services/queries/find_all_creations_query.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/queries/find_all_creations_query.rb b/app/services/queries/find_all_creations_query.rb index 3c0450f7..acb8bbfe 100644 --- a/app/services/queries/find_all_creations_query.rb +++ b/app/services/queries/find_all_creations_query.rb @@ -10,6 +10,6 @@ class FindAllCreationsQuery private def find_creations - Creation.includes(:user, :photos).where(:is_restricted => false).uniq + Creation.includes(:user, :photos).where(:is_restricted => false).where('photos_count > 0').uniq end end |
