Commit bffcbe10

mo khan <mo@mokhan.ca>
2013-07-02 06:30:08
hide cakes with no photos
1 parent 347cc91
Changed files (1)
app/controllers/creation_tags_controller.rb
@@ -7,6 +7,6 @@ class CreationTagsController < ApplicationController
     @tag = params[:id].downcase.gsub(/ /, '-')
     @total_tutorials = Tutorial.tagged_with(@tag).count
     @total_creations = Creation.tagged_with(@tag).count
-    @creations = Creation.includes([:user, :tags, :photos]).tagged_with([@tag]).page(params[:page]).per(15)
+    @creations = Creation.includes([:user, :tags, :photos]).tagged_with([@tag]).where('photos_count > 0').page(params[:page]).per(15)
   end
 end