mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
5 lines
189 B
Ruby
5 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
|