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
Rails/RedundantActiveRecordAllMethod
Rails/RedundantActiveRecordAllMethod ignores .all when it is called with args, e.g Foo.all(blah)
.all
Foo.all(blah)
Rails/RedundantActiveRecordAllMethod removes .all when it is called with args, e.g Foo.all(blah), breaking the syntax.
It transforms:
Foo.baz(class: 'hello').all(type: 'div').first
into
Foo.baz(class: 'hello').(type: 'div')first
which is completely invalid syntax
See code above
1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [aarch64-linux] - rubocop-rails 2.21.0 - rubocop-rspec 2.23.2
The text was updated successfully, but these errors were encountered:
This issue is a dup with #1110 and fixed by #1114. It will be released soon (Maybe tomorrow). Please wait a moment.
Sorry, something went wrong.
No branches or pull requests
Expected behavior
Rails/RedundantActiveRecordAllMethod
ignores.all
when it is called with args, e.gFoo.all(blah)
Actual behavior
Rails/RedundantActiveRecordAllMethod
removes.all
when it is called with args, e.gFoo.all(blah)
, breaking the syntax.It transforms:
into
which is completely invalid syntax
Steps to reproduce the problem
See code above
RuboCop version
The text was updated successfully, but these errors were encountered: