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
When running bundle exec rubocop --debug --only=Rails/DeprecatedActiveModelErrorsMethods -- test.rb against a file test.rb containing
bundle exec rubocop --debug --only=Rails/DeprecatedActiveModelErrorsMethods -- test.rb
result = "foo" result.errors.keys
I get an error:
An error occurred while Rails/DeprecatedActiveModelErrorsMethods cop was inspecting /Users/bquorning/Code/rubocop/rubocop-rails/test.rb:2:0. undefined method `method?' for s(:lvar, :result):RuboCop::AST::Node Did you mean? method methods /Users/bquorning/Code/rubocop/rubocop-rails/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb:122:in `autocorrect' /Users/bquorning/Code/rubocop/rubocop-rails/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb:112:in `block (2 levels) in on_send' /Users/bquorning/.gem/ruby/2.7.6/bundler/gems/rubocop-a5de777eb80f/lib/rubocop/cop/base.rb:342:in `correct' /Users/bquorning/.gem/ruby/2.7.6/bundler/gems/rubocop-a5de777eb80f/lib/rubocop/cop/base.rb:127:in `add_offense' /Users/bquorning/Code/rubocop/rubocop-rails/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb:109:in `block in on_send' /Users/bquorning/Code/rubocop/rubocop-rails/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb:58:in `any_manipulation?' /Users/bquorning/Code/rubocop/rubocop-rails/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb:108:in `on_send' [...]
$ ❯ bundle exec rubocop -V 1.30.0 (using Parser 3.1.2.0, rubocop-ast 1.18.0, running on ruby 2.7.6 x86_64-darwin20) - rubocop-performance 1.14.2 - rubocop-rails 2.15.0 - rubocop-rspec 2.11.1
The text was updated successfully, but these errors were encountered:
[Fix rubocop#717] Fix an error for `Rails/DeprecatedActiveModelErrors…
b368822
…Methods`
a8a491f
…Methods` Fixes rubocop#717. This PR fixes an error for `Rails/DeprecatedActiveModelErrorsMethods` when root receiver is a variable.
0640cb3
Rails/DeprecatedActiveModelErrorsMethods
Merge pull request #721 from koic/fix_an_error_for_rails_deprecated_a…
9b454fa
…ctive_model_errors_methods [Fix #717] Fix an error for `Rails/DeprecatedActiveModelErrorsMethods`
Successfully merging a pull request may close this issue.
When running
bundle exec rubocop --debug --only=Rails/DeprecatedActiveModelErrorsMethods -- test.rb
against a file test.rb containingI get an error:
RuboCop version
The text was updated successfully, but these errors were encountered: