public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Changed some_contacts to just return the recent contacts (for now)
We should make it random, but to it efficiently
Michael Hartl (author)
Thu May 01 14:52:09 -0700 2008
commit  b96919179aa5ced2c709ee21a95d972855fe1a89
tree    1b9468a6e54db09da8196fe4ed2a8f17bcebc7c2
parent  6f94c019b03be4b60ef0f26b01453f1e0baec09a
...
49
50
51
52
 
 
53
54
55
...
144
145
146
147
 
148
149
150
...
49
50
51
 
52
53
54
55
56
...
145
146
147
 
148
149
150
151
0
@@ -49,7 +49,8 @@ class Person < ActiveRecord::Base
0
                       :limit => NUM_WALL_COMMENTS
0
   has_many :connections
0
   has_many :contacts, :through => :connections,
0
- :conditions => "status = #{Connection::ACCEPTED}"
0
+ :conditions => "status = #{Connection::ACCEPTED}",
0
+ :order => 'people.created_at DESC'
0
   has_many :photos, :dependent => :destroy, :order => 'created_at'
0
   has_many :requested_contacts, :through => :connections,
0
            :source => :contact,
0
@@ -144,7 +145,7 @@ class Person < ActiveRecord::Base
0
 
0
   # Return some contacts for the home page.
0
   def some_contacts
0
- contacts.shuffle[(0...12)]
0
+ contacts[(0...12)]
0
   end
0
 
0
   # Contact links for the contact image raster.

Comments

    No one has commented yet.