Commit b73c8811

mo khan <mo@mokhan.ca>
2013-06-24 22:43:19
eager fetch the photos on the tags page
1 parent a698210
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]).tagged_with([@tag]).page(params[:page]).per(15)
+    @creations = Creation.includes([:user, :tags, :photos]).tagged_with([@tag]).page(params[:page]).per(15)
   end
 end