|
|
|
@ -6,7 +6,7 @@ class Doctrine::AnnotationsController < ApplicationController |
|
|
|
attrs = resource_params.to_unsafe_h |
|
|
|
attrs = resource_params.to_unsafe_h |
|
|
|
document_id = attrs.delete(:document_id) |
|
|
|
document_id = attrs.delete(:document_id) |
|
|
|
|
|
|
|
|
|
|
|
@annotation = Annotation.new(attrs) |
|
|
|
@annotation = @doctrine.annotations.new(attrs) |
|
|
|
|
|
|
|
|
|
|
|
if document_id.present? |
|
|
|
if document_id.present? |
|
|
|
@annotation.document = Cdao::Jurisprudence.find(attrs.delete(:document_id)) |
|
|
|
@annotation.document = Cdao::Jurisprudence.find(attrs.delete(:document_id)) |
|
|
|
|