Fix person show
This commit is contained in:
parent
a7e30adc28
commit
db417abc18
1 changed files with 1 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ module Diaspora
|
||||||
def posts_from(person)
|
def posts_from(person)
|
||||||
asp = Aspect.arel_table
|
asp = Aspect.arel_table
|
||||||
p = Post.arel_table
|
p = Post.arel_table
|
||||||
Post.includes(:aspects).where( p[:public].eq(true).or(asp[:user_id].eq(self.id))).order("posts.updated_at DESC")
|
person.posts.includes(:aspects).where( p[:public].eq(true).or(asp[:user_id].eq(self.id))).select('DISTINCT `posts`.*').order("posts.updated_at DESC")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue