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