Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielgrippi <danielgrippi@gmail.com>2011-09-14 10:12:01 +0400
committerdanielgrippi <danielgrippi@gmail.com>2011-09-14 11:10:04 +0400
commitaed08d6283a47965723fca1487e92e2ae8c94868 (patch)
tree867b0b4059c80c4a69de5d53624b78d226d6a3e3
parent88688d9bb61606cfba68480c85765d051883b2d1 (diff)
removed unused method; moved includes() out of scope
-rw-r--r--app/models/person.rb2
-rw-r--r--lib/aspect_stream.rb2
-rw-r--r--lib/diaspora/user/querying.rb4
3 files changed, 2 insertions, 6 deletions
diff --git a/app/models/person.rb b/app/models/person.rb
index a36784532..4cc3e723a 100644
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -55,7 +55,7 @@ class Person < ActiveRecord::Base
joins(:contacts => :aspect_memberships).
where(:contacts => {:user_id => user.id},
:aspect_memberships => {:aspect_id => aspect_ids}).
- select("DISTINCT people.*").includes(:profile)
+ select("DISTINCT people.*")
}
def self.featured_users
diff --git a/lib/aspect_stream.rb b/lib/aspect_stream.rb
index 3ba121c8b..ec5404600 100644
--- a/lib/aspect_stream.rb
+++ b/lib/aspect_stream.rb
@@ -51,7 +51,7 @@ class AspectStream
# @return [ActiveRecord::Association<Person>] AR association of people within stream's given aspects
def people
- @people ||= Person.all_from_aspects(aspect_ids, @user)
+ @people ||= Person.all_from_aspects(aspect_ids, @user).includes(:profile)
end
# The first aspect in #aspects, given the stream is not for all aspects, or #aspects size is 1
diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb
index c34c0a37b..a3c9e555c 100644
--- a/lib/diaspora/user/querying.rb
+++ b/lib/diaspora/user/querying.rb
@@ -95,10 +95,6 @@ module Diaspora
end
end
- def all_aspect_ids
- self.aspects.all.collect{|x| x.id}
- end
-
def posts_from(person)
return self.person.posts.where(:pending => false).order("created_at DESC") if person == self.person
con = Contact.arel_table