-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
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
Extend Style/SymbolProc
's AllowedMethods
#779
Comments
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 9, 2022
Fixes rubocop#779. This PR adds `mail` to `AllowedMethods` of `Style/SymbolProc`.
9 tasks
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 9, 2022
Fixes rubocop#779. This PR adds `mail` to `AllowedMethods` of `Style/SymbolProc`. `define_methods` and `respond_to` inherit from RuboCop core.
koic
added a commit
that referenced
this issue
Oct 21, 2022
…e_symbol_proc [Fix #779] Add `mail` to `AllowedMethods` of `Style/SymbolProc`
koic
added a commit
to koic/rubocop
that referenced
this issue
Dec 5, 2022
…/SymbolProc` The commit below adds `respond_to` to the config, which looks like a Rails method. rubocop@54ff86e Ruby has method called `respond_to?`, not `respond_to`. So `respond_to` is a Rails API and `respond_to?` doesn't take a block argument. RuboCop core does not depend on Rails, so move the `respond_to` config from RuboCop core to RuboCop Rails. I noticed this by rubocop/rubocop-rails#779. This removed setting was added in RuboCop Rails 2.17. Rails application developers can get this change in the upgrade. rubocop/rubocop-rails#806
Merged
8 tasks
bbatsov
pushed a commit
to rubocop/rubocop
that referenced
this issue
Dec 5, 2022
…/SymbolProc` The commit below adds `respond_to` to the config, which looks like a Rails method. 54ff86e Ruby has method called `respond_to?`, not `respond_to`. So `respond_to` is a Rails API and `respond_to?` doesn't take a block argument. RuboCop core does not depend on Rails, so move the `respond_to` config from RuboCop core to RuboCop Rails. I noticed this by rubocop/rubocop-rails#779. This removed setting was added in RuboCop Rails 2.17. Rails application developers can get this change in the upgrade. rubocop/rubocop-rails#806
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Style/SymbolProc
'sAllowedMethods
defaults to[respond_to, define_method]
so that you can doThis could be extended to
ActionMailer
's.mail
method which works similarly:Describe the solution you'd like
AllowedMethods
defaults to[respond_to, define_method, mail]
The text was updated successfully, but these errors were encountered: