class Document::DoctrinesController < ApplicationController include AnnotationSearch load_and_authorize_resource :document, class: "Cdao::Jurisprudence" load_and_authorize_resource :doctrine, class: "Doctrine", through: :document def show search = annotation_search({ doctrine_id: @doctrine.id }) @annotations = search.results end end