Browse Source

Add missing model associations

pull/9/head
Angel Aviel Domaoan 4 years ago committed by Angel Aviel Domaoan
parent
commit
f7a3021ca4
  1. 5
      app/models/cdao/jurisprudence.rb

5
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

Loading…
Cancel
Save