Can someone tell me what is the equivalent way to do the following line in Rails 4?
has_many :friends, :through => :friendships, :conditions => \"statu
In order to work on Rails 4.1 (my case), i had to put:
has_many :friends, -> { where(friendships: { status: 'accepted' }) }, through: :friendships
Note the S on friendships. It refers directly to the database name.