preload people and their profiles in comments on aspects/index

This commit is contained in:
danielgrippi 2011-07-04 14:39:12 -07:00
parent 84eb8a7063
commit 9eac29d15e

View file

@ -38,7 +38,7 @@ class AspectsController < ApplicationController
:type => ['StatusMessage','ActivityStreams::Photo'],
:order => session[:sort_order] + ' DESC',
:max_time => params[:max_time].to_i
).includes(:comments, :mentions, :likes)
).includes(:photos, :likes, {:comments => {:author => :profile}}, {:mentions => {:person => :profile}})
@posts = PostsFake.new(posts)
if params[:only_posts]