diff --git a/app/models/cdao/jurisprudence.rb b/app/models/cdao/jurisprudence.rb index 48f05d4..daa960b 100644 --- a/app/models/cdao/jurisprudence.rb +++ b/app/models/cdao/jurisprudence.rb @@ -1,8 +1,13 @@ class Cdao::Jurisprudence < Cdao::Base self.table_name = "jurisprudences" + has_many :annotations, as: :document, dependent: :restrict_with_error + has_many :doctrines, as: :document, dependent: :restrict_with_error + has_many :annotation_documents, as: :document, dependent: :restrict_with_error + has_many :annotations_as_cited, through: :annotation_documents, source: :annotation + alias_attribute :doc_date, :docdate def subjects