Why use instance variables to “connect” controllers with views?
This is a conceptual question and I haven't been able to find the answer in SO, so here I go: Why instance variables are used to connect controllers and views? Don't we have two different objects of two different classes (Controller vs Views). So, when the view is rendered we are in a different context, but we are using instance variables of another object? Isn't this breaking encapsulation in somehow? How does Rails manage to do that matching from one object to another? Does it clone all the instances variables of the controller to the view? In a sense, you could say that it is breaking