How to validate unscoped records if default_scope is added in rails?

264 views Asked by At

I wan to validate all unscoped records. I have added default scope is there a way other than custom code.

1

There are 1 answers

0
MurifoX On

There is a method called unscoped, that ignores the default scope of the class. For more info: https://prathamesh.tech/2019/07/15/how-to-not-use-unscope-in-rails/