Commit d189b097

mo khan <mo@mokhan.ca>
2014-09-09 00:18:07
fix n+1s
1 parent 9d287bd
Changed files (2)
app/controllers/profiles_controller.rb
@@ -7,6 +7,6 @@ class ProfilesController < ApplicationController
 
   def show
     @user = User.find(params[:id])
-    @creations = @user.creations.includes([:user, :photos])
+    @creations = @user.creations.includes(:photos)
   end
 end
app/controllers/tutorials_controller.rb
@@ -1,6 +1,6 @@
 class TutorialsController < ApplicationController
   def index
-    @tutorials = Tutorial.includes(:tags).page(params[:page]).per(15)
+    @tutorials = Tutorial.includes(:user).page(params[:page]).per(12)
   end
 
   def show