aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/models/friendship.rb
blob: 6b4f7acc38629cfa476d8cf6fa6ca87eb8a29244 (plain) (tree)
1
2
3
4



                                                                                                       
class Friendship < ActiveRecord::Base
  belongs_to :friend, class_name: 'Person'
  belongs_to :follower, foreign_key: 'friend_id', class_name: 'Person', counter_cache: :followers_count
end