Question: I have a model using Paranioa gem ( <https://github.com/radar/paranoia> ) for keeping deleted ActiveRecord elements in database. Paranioa uses a `deleted_at` column ; when this column is `NULL`, the object is not deleted. It works using a default scope, like this :

```
default_scope { where(:deleted_at => nil) }

```

My problem is that I want to get all the elements (including deleted ones) in a scope :

```
class MyOtherModel < ActiveRecord::Base
   has_many :paranoia_models
end

```

This declaration generates queries like this :

```
SELECT * FROM `paranioa_models` WHERE `paranioa_models`.`deleted_at` IS NULL AND ...

```

It's easy to get all my elements (including deleted ones) with a function like this

```
def paranioa_models_with_deleted
  return self.paranioa_models.with_deleted
end

```

The `with_deleted` unscope default scope.

My question is: How can I unscope this default\_scope in the scope of MyOtherModel, directly in the `:has_many` scope ?

Your solutions :

* `has_many :paranoia_models, -> { unscoped }` returns only non-deleteds
* `self.paranoia_models.unscoped` returns ALL the ParanoiaModels (including ParanoiaModel belonging to others)

Answer: 
Did you try this?

```
def paranoia_models
   ParanoiaModel.unscoped { super }
end

```
u can remove or override the default\_scope in rails.
for example:

```
default_scope { where(:deleted_at => nil) }

ParanioaModel.all

ParanioaModel.unscoped.all

```

unscope will skip the default scope here.