Remove scoping inside scope

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 9.0.1
    • Affects Version/s: 9.0.0, 7.5.4, 8.0.8
    • Component/s: None
    • None
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Hi,

      I need to remove a part of criteria (specifically, the default scope from mongoid_paranoia) which I'm doing by either
      users.remove_scoping(User.where(deleted_at: nil))
      or
      users.selector.delete('deleted_at')
      I wanted to extract this to a scope (with_deleted) but then it doesn't work anymore, and I was able to identify that it's caused by always merging the criteria to the default scope here].
      Not sure this is indented behavior, or if there's some way to achieve it.

              Assignee:
              Jamis Buck
              Reporter:
              Marek Stanczyk
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: