removed unused method; moved includes() out of scope
This commit is contained in:
parent
88688d9bb6
commit
aed08d6283
3 changed files with 2 additions and 6 deletions
|
|
@ -55,7 +55,7 @@ class Person < ActiveRecord::Base
|
||||||
joins(:contacts => :aspect_memberships).
|
joins(:contacts => :aspect_memberships).
|
||||||
where(:contacts => {:user_id => user.id},
|
where(:contacts => {:user_id => user.id},
|
||||||
:aspect_memberships => {:aspect_id => aspect_ids}).
|
:aspect_memberships => {:aspect_id => aspect_ids}).
|
||||||
select("DISTINCT people.*").includes(:profile)
|
select("DISTINCT people.*")
|
||||||
}
|
}
|
||||||
|
|
||||||
def self.featured_users
|
def self.featured_users
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class AspectStream
|
||||||
|
|
||||||
# @return [ActiveRecord::Association<Person>] AR association of people within stream's given aspects
|
# @return [ActiveRecord::Association<Person>] AR association of people within stream's given aspects
|
||||||
def people
|
def people
|
||||||
@people ||= Person.all_from_aspects(aspect_ids, @user)
|
@people ||= Person.all_from_aspects(aspect_ids, @user).includes(:profile)
|
||||||
end
|
end
|
||||||
|
|
||||||
# The first aspect in #aspects, given the stream is not for all aspects, or #aspects size is 1
|
# The first aspect in #aspects, given the stream is not for all aspects, or #aspects size is 1
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,6 @@ module Diaspora
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_aspect_ids
|
|
||||||
self.aspects.all.collect{|x| x.id}
|
|
||||||
end
|
|
||||||
|
|
||||||
def posts_from(person)
|
def posts_from(person)
|
||||||
return self.person.posts.where(:pending => false).order("created_at DESC") if person == self.person
|
return self.person.posts.where(:pending => false).order("created_at DESC") if person == self.person
|
||||||
con = Contact.arel_table
|
con = Contact.arel_table
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue