unscoped won't work chained with a scope

XMLWordPrintableJSON

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

      I have a Book model with a default scope and another scope:

      default_scope where(:removed.ne => true)
      scope :modified, where(modified: true)
      If I try to get all modified objects, together with removed ones, I would try this (as per Person.unscoped.washed_up example on mongoid.org)

      Book.unscoped.modified
      but this includes the default scope no matter what I do

      => #<Mongoid::Criteria
      selector: {:removed=>

      {"$ne"=>true}

      , :modified=>true},
      options: {},
      class: Book,
      embedded: false>
      Is this a bug or the intended behavior?

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

                Created:
                Updated:
                Resolved: