2017-07-09 13:41:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2009-05-01 11:01:13 -04:00
|
|
|
class Interest < ActiveRecord::Base
|
2020-08-13 18:11:28 -04:00
|
|
|
belongs_to :human, inverse_of: :interests
|
|
|
|
belongs_to :human_with_callbacks,
|
|
|
|
class_name: "Human",
|
|
|
|
foreign_key: :human_id,
|
2019-10-09 18:49:34 -04:00
|
|
|
inverse_of: :interests_with_callbacks
|
2020-08-13 18:11:28 -04:00
|
|
|
belongs_to :polymorphic_human, polymorphic: true, inverse_of: :polymorphic_interests
|
|
|
|
belongs_to :polymorphic_human_with_callbacks,
|
|
|
|
foreign_key: :polymorphic_human_id,
|
|
|
|
foreign_type: :polymorphic_human_type,
|
2019-10-09 18:49:34 -04:00
|
|
|
polymorphic: true,
|
|
|
|
inverse_of: :polymorphic_interests_with_callbacks
|
2016-08-06 13:37:57 -04:00
|
|
|
belongs_to :zine, inverse_of: :interests
|
2009-05-01 11:01:13 -04:00
|
|
|
end
|