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

delete, remove, destroy always true?

    • Type: Icon: Task Task
    • Resolution: Done
    • 4.0.0 final
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Not sure if it could be an issue but here is.

      f=Foo.new
      f.persisted?
      => false
      f.delete
      => true #also for #remove & #destroy
      f.save
      => RuntimeError: can't modify frozen Hash ...
      ....

      I think it should return false or raise exception when trying to delete a not persisted object and possibly not to freeze it.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ghost Deleted user
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: