diff --git a/app/controllers/doctrine/annotations_controller.rb b/app/controllers/doctrine/annotations_controller.rb index 5b9135d..4ec173b 100644 --- a/app/controllers/doctrine/annotations_controller.rb +++ b/app/controllers/doctrine/annotations_controller.rb @@ -6,7 +6,7 @@ class Doctrine::AnnotationsController < ApplicationController attrs = resource_params.to_unsafe_h document_id = attrs.delete(:document_id) - @annotation = Annotation.new(attrs) + @annotation = @doctrine.annotations.new(attrs) if document_id.present? @annotation.document = Cdao::Jurisprudence.find(attrs.delete(:document_id))