-
-
Notifications
You must be signed in to change notification settings - Fork 284
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Imagine the following helper:
module ButtonHelper
class Button
def initialize(text:)
@text = text
end
end
def button(**)
render Button.new(**)
end
end
Currently rubocop returns the offense Rails/HelperInstanceVariable
: Do not use instance variables in helpers.
Describe the solution you'd like
Rubocop should analyze whether the use of the instance variable occurs within a class, in which case it should ignore it.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request