ab217
ab217

Reputation: 17180

How Do Rails Controllers Share Instance Variables with Views?

I am fairly new to Rails, but I am pretty experienced with Ruby. Can somebody tell me how Rails makes instance variables from a controller available to views. How did the Rails team go about implementing this?

Upvotes: 3

Views: 362

Answers (1)

rfunduk
rfunduk

Reputation: 30452

It would take a lot of digging through the rails source to figure it out for sure, but I believe it's mostly done using the standard Ruby 'binding' stuff.

Upvotes: 1

Related Questions