Skip to content

with_deleted scope #75

Description

@stanley90

Hi, I needed to have an option to remove the paranoia condition from an already-chained query (so can't use unscoped anymore), so I added the following scope:
scope :with_deleted, -> { criteria.remove_scoping(base.unscoped.where(deleted_at: nil)) }
Would you consider including it in Paranoia?
(note: it depends on this mongodb/mongoid#5832)
Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions