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

delete, remove, destroy always true?

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.0.0 final
    • Component/s: None
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: