Commit bbb90831

mo khan <mo@mokhan.ca>
2013-07-02 05:55:07
filter out cakes with no photos
1 parent f48ccdb
Changed files (1)
app
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