vrfs-774: added order_by to followings association

This commit is contained in:
Jonathan Kolyer 2013-11-05 04:13:07 -06:00
parent d6e4732604
commit 3329f8067e
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ module JamRuby
has_many :inverse_followers, :through => :inverse_user_followers, :source => :user, :class_name => "JamRuby::User"
# user followings
has_many :user_followings, :class_name => "JamRuby::UserFollowing", :foreign_key => "follower_id"
has_many :user_followings, :class_name => "JamRuby::UserFollowing", :foreign_key => "follower_id", :order => 'created_at DESC'
has_many :followings, :through => :user_followings, :class_name => "JamRuby::User"
has_many :inverse_user_followings, :through => :followings, :class_name => "JamRuby::UserFollowing", :foreign_key => "user_id"
has_many :inverse_followings, :through => :inverse_user_followings, :source => :user, :class_name => "JamRuby::User"