You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
717 B

class JurisprudencesIndexTableComponent < BaseComponent
with_collection_parameter :jurisprudence
attr_reader :jurisprudence, :opts
def initialize(jurisprudence:, current_user:, opts: {})
@jurisprudence = jurisprudence
@opts = opts
end
delegate :id, to: :jurisprudence
delegate :clean_reference_number, to: :jurisprudence
delegate :title, to: :jurisprudence
delegate :short_title, to: :jurisprudence
delegate :document, to: :jurisprudence
def date_or_year
return jurisprudence.docdate.strftime("%B %d, %Y") if jurisprudence.docdate.present?
jurisprudence.year
end
def doctrine_annotations_path(doctrine_id)
doctrine_annotations_path(doctrine_id: doctrine_id)
end
end