Can someone tell me what is the equivalent way to do the following line in Rails 4?
has_many :friends, :through => :friendships, :conditions => \"statu
has_many :friends, -> { where(status: 'accepted').order('first_name')}, through: :friendships
or
has_many :friends, -> { where(status: 'accepted').order(:first_name)}, through: :friendships