Michael Murphy

Michael Murphy

TagInstance Variables


Partials Should Never Contain Instance Variables

Posted on May 3rd, 2016.

It may seem that the benefits of partials in our Rails application are endless. They help keep our views DRY, organized, and easily reusable. But with great power comes great responsibility. Due to the flexibility partials give us, controlling the data flow to partials should not be an oversight.┬áLet’s say we’re using one...