diff options
| author | mo khan <mo@mokhan.ca> | 2013-05-04 22:38:01 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-05-04 22:38:01 -0600 |
| commit | 32df274363f7ae44a2386bd6690ae153af084f87 (patch) | |
| tree | 4bcbcaab84c6e7c117a7690b1bedc7415db234ee /app/controllers/tutorials_controller.rb | |
| parent | 5f9d4254fc7b9fe7e38be8ca877044cd8a02565c (diff) | |
eager fetch tags with tutorials
Diffstat (limited to 'app/controllers/tutorials_controller.rb')
| -rw-r--r-- | app/controllers/tutorials_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index 3901832b..b9e74dd1 100644 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -2,7 +2,7 @@ class TutorialsController < ApplicationController before_filter :authenticate_user!, :except => [:show, :index] def index - @tutorials = Tutorial.page(params[:page]).per(15) + @tutorials = Tutorial.includes(:tags).page(params[:page]).per(15) end def show |
