Commit 2a39ee1a

mo khan <mo@mokhan.ca>
2014-01-06 05:01:03
filter out creations with images that haven't been processed.
1 parent 4c282b9
Changed files (1)
app
app/models/creation.rb
@@ -47,7 +47,7 @@ class Creation < ActiveRecord::Base
     end
 
     def visible_creations
-      Creation.includes(:user, :photos).where(:is_restricted => false).where('photos_count > 0').uniq
+      Creation.distinct.includes(:user).joins(:photos).where(is_restricted: false, 'photos.image_processing' => nil)
     end
   end
 end