blob: 75d284ac2511b3bb526f8824a847256f9a7f67e9 (
plain) (
blame)
1
2
3
4
5
6
7
|
# frozen_string_literal: true
class Dog < ActiveRecord::Base
belongs_to :breeder, class_name: "DogLover", counter_cache: :bred_dogs_count
belongs_to :trainer, class_name: "DogLover", counter_cache: :trained_dogs_count
belongs_to :doglover, foreign_key: :dog_lover_id, class_name: "DogLover", counter_cache: true
end
|