Browse Source

Fix `doctrine/annotations#create`

pull/9/head
Angel Aviel Domaoan 4 years ago committed by Angel Aviel Domaoan
parent
commit
09c7436b0c
  1. 2
      app/controllers/doctrine/annotations_controller.rb

2
app/controllers/doctrine/annotations_controller.rb

@ -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))

Loading…
Cancel
Save