views:

25

answers:

1

In Ruby on Rails, how is an ActionView object able to access the instance variables of ActionController object (how is view code able to use instance variables that are set inside the controller code)?

A: 

It isn't. The controller creates fresh instance variables inside the view object, based on the instance variables in the controller

Gareth
i assume it is just duplicate references, not cloning objects? how do you create new instance variables in another object?
動靜能量