disambiguate ordering
This commit is contained in:
parent
371aa71ca8
commit
99e55c82eb
1 changed files with 1 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ module Diaspora
|
|||
opts[:type] ||= ['StatusMessage', 'Photo']
|
||||
opts[:limit] ||= 20
|
||||
opts[:order] ||= 'created_at DESC'
|
||||
opts[:order] = '`posts`.' + opts[:order]
|
||||
|
||||
posts_from_others = Post.joins(:contacts).where(:contacts => {:user_id => self.id})
|
||||
posts_from_self = self.person.posts.joins(:aspect_visibilities => :aspect).where(:aspects => {:user_id => self.id})
|
||||
|
|
|
|||
Loading…
Reference in a new issue