Specify type

This commit is contained in:
Raphael 2011-01-17 19:40:14 -08:00
parent 6474ca9540
commit eee9561656

View file

@ -16,8 +16,8 @@ module Diaspora
end
def visible_photos
p = Post.arel_table
Post.joins(:aspects).where(p[:status_message_id].not_eq(nil).or(p[:pending].eq(false))
p = Photo.arel_table
Photo.joins(:aspects).where(p[:status_message_id].not_eq(nil).or(p[:pending].eq(false))
).where(:aspects => {:user_id => self.id}).select('DISTINCT `posts`.*').order("posts.updated_at DESC")
end