Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-410

Paranoia module with embedded documents throws error

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.3.1
    • Affects Version/s: None
    • Component/s: None

      I've encountered and issue when trying to use Mongoid::Paranoia on
      embedded document.
      The models look like this:
      http://gist.github.com/548876
      If I try to change simple destroy method call into .delete method call
      like this:
      def destroy
      @expense = @project.expenses.find(params[:id])
      @expense.delete
      ......
      end
      It throws me an error on line with @expense.delete:
      Access to the collection for Expense is not allowed since it is an
      embedded document, please access a collection from the root document.

            Assignee:
            Unassigned Unassigned
            Reporter:
            aziz M
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: