Skip to content

Files

Latest commit

 

History

History
19 lines (11 loc) · 529 Bytes

Rails-HelperInstanceVariable.md

File metadata and controls

19 lines (11 loc) · 529 Bytes

Pattern: Use of instance variables in helper

Issue: -

Description

Relying on instance variables makes it difficult to re-use helper methods.

If it seems awkward to explicitly pass in each dependent variable, consider moving the behavior elsewhere, for example to a model, decorator or presenter.

Default configuration

Attribute Value
Include app/helpers/**/*.rb

Further Reading