summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-05-04 22:37:16 -0600
committermo khan <mo@mokhan.ca>2013-05-04 22:37:16 -0600
commit5f9d4254fc7b9fe7e38be8ca877044cd8a02565c (patch)
tree563428dbbd4cf19ea2e85f3b351fe854a903d146 /app/controllers
parentaf45a3aded13df147e8acfa6db1305445e886c8c (diff)
eager fetch avatar in artists listing
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/profiles_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index a760f50b..02ea2909 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -2,7 +2,7 @@ class ProfilesController < ApplicationController
before_filter :authenticate_user!, :except => [:index, :show]
def index
- @profiles = User.page(params[:page]).per(12)
+ @profiles = User.includes(:avatar).page(params[:page]).per(12)
end
def show