1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/friendship.rb

4 lines
189 B
Ruby

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