Is there a quick (command OR gem OR test framework) to ensure that all View variables point to Controller variables?
I worked on a Rails app where a View variable was spelled incorrectly, and therefore did not display the data being called in the Controller. For example, @person.name is not displayed in the view.
Controller
|- @person.name = 'first'
|- @person.email = 'first@gmail.com'
|- @person.cell = '123-456-7890'
View
|- display @person.nameE # => NoMethodError
|- display @person.email # => first@gmail.com
|- dispaly @person.cell # => 123-456-7890
This will result in @person.name not displaying on the view since it is incorrectly pointed to.
Actually,
@person.nameEwon’t return nil — it’ll raiseNoMethodError. As long as you have a test loading that view, you’ll see it blow up when you run it.