class DocumentDoctrineIndexComponent < BaseComponent with_collection_parameter :doctrine attr_reader :doctrine def initialize(doctrine:, current_user:) @doctrine = doctrine end delegate :id, to: :doctrine delegate :subject_ids, to: :doctrine delegate :content, to: :doctrine delegate :document_id, to: :doctrine delegate :annotations, to: :doctrine delegate :subjects, to: :doctrine def doctrine_form_url jurisprudence_doctrines_path(jurisprudence_id: document_id) end def annotation_form_url doctrine_annotations_path(doctrine_id: id) end end