makandra / makandra-rubocop

makandra's default Rubocop configuration
MIT License
6 stars 1 forks source link

Discussion: Rails/HelperInstanceVariable #12

Closed FLeinzi closed 4 years ago

FLeinzi commented 4 years ago

https://www.rubydoc.info/gems/rubocop-rails/RuboCop/Cop/Rails/HelperInstanceVariable

Example:

app/helpers/some_helper.rb:5:34: C: Rails/HelperInstanceVariable: Do not use instance variables in helpers.
  return if Rails.env.test? && @instance_variable

I want to disable this cop since we sometimes have used instance variables in helpers for good reasons.

foobear commented 4 years ago

I agree that there are reasons. I vote for disabling this cop = :-1: