Add some includes to a query
This commit is contained in:
parent
88fa595d59
commit
591915a2cd
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ module Diaspora
|
|||
module Querying
|
||||
|
||||
def find_visible_post_by_id( id )
|
||||
self.raw_visible_posts.where(:id => id).first
|
||||
self.raw_visible_posts.where(:id => id).includes({:person => :profile}, {:comments => {:person => :profile}}, :photos).first
|
||||
end
|
||||
|
||||
def raw_visible_posts
|
||||
|
|
|
|||
Loading…
Reference in a new issue