Browse Source

Fix `doctrine/annotations#create`

pull/6/head
Angel Aviel Domaoan 4 years ago committed by Angel Aviel Domaoan
parent
commit
a2c003e45f
  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
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))

Loading…
Cancel
Save