new_record? and Mongoid::Paranoia

XMLWordPrintableJSON

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

      When using Paranoia, checking new_record? returns false if the object was previously deleted.

          @user= User.create email: 'test@example.com'
          @user.delete
          @new_user = User.find_or_create_by(email: 'test@example.com')
          @new_user.new_record?.should be
      

              Assignee:
              Durran Jordan
              Reporter:
              fzf
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: