You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I generally agree with the Rails::HelperInstanceVariable cop, but I believe there are reasonable scenarios where an instance variable can (and perhaps should) be used as a default argument to a helper method.
I'd like to be able to keep the Rails::HelperInstanceVariable cop in play for instance variables within the helper method body, but allow instance variables as default arguments.
Rails/HelperInstanceVariable:
AllowArguments: true # or something similar
Is this something that rubocop-rails team might consider if a PR was submitted?
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I generally agree with the
Rails::HelperInstanceVariable
cop, but I believe there are reasonable scenarios where an instance variable can (and perhaps should) be used as a default argument to a helper method.Here's a contrived example:
Describe the solution you'd like
I'd like to be able to keep the
Rails::HelperInstanceVariable
cop in play for instance variables within the helper method body, but allow instance variables as default arguments.Is this something that rubocop-rails team might consider if a PR was submitted?
The text was updated successfully, but these errors were encountered: