We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://rails-bestpractices.com/posts/2013/06/15/default_scope-is-evil/ https://andycroll.com/ruby/dont-use-default-scope/ https://stackoverflow.com/questions/25087336/why-is-using-the-rails-default-scope-often-recommend-against/
There should be a cop against declaring a default_scope in AR models.
default_scope
The text was updated successfully, but these errors were encountered:
Ban use of default_scope
4077687
This AR method does more harm than good, especially in large codebases. rubocop/rubocop-rails#76 lists these bits of evidence against it: * https://rails-bestpractices.com/posts/2013/06/15/default_scope-is-evil/ * https://andycroll.com/ruby/dont-use-default-scope/ * https://stackoverflow.com/questions/25087336/why-is-using-the-rails-default-scope-often-recommend-against/
Rails/DefaultScope
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
https://rails-bestpractices.com/posts/2013/06/15/default_scope-is-evil/
https://andycroll.com/ruby/dont-use-default-scope/
https://stackoverflow.com/questions/25087336/why-is-using-the-rails-default-scope-often-recommend-against/
Describe the solution you'd like
There should be a cop against declaring a
default_scope
in AR models.The text was updated successfully, but these errors were encountered: