最佳答案
Can someone tell me what is the equivalent way to do the following line in Rails 4?
has_many :friends, :through => :friendships, :conditions => "status = 'accepted'", :order => :first_name
I tried the following:
has_many :friends, -> { where status: 'accepted' }, :through => :friendships , :order => :first_name
But I get the following error:
Invalid mix of scope block and deprecated finder options on ActiveRecord association: User.has_many :friends