summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-01 22:55:07 -0700
committermo khan <mo@mokhan.ca>2013-07-01 22:55:07 -0700
commitbbb9083127bde8deac283bf159cda0f8a76ceb68 (patch)
tree9fc365d0a74300b8b196205fe1a5f43b411d5168 /app/services
parentf48ccdbf174b28f5bc1d2fddd71dfb2fed9337cc (diff)
filter out cakes with no photos
Diffstat (limited to 'app/services')
-rw-r--r--app/services/queries/find_all_creations_query.rb2
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