Re:OK, here's the thing: this is only the entrance of the ra...
by jasonlotito on Tuesday October 19, 2010 @02:58PM
(#1808285)
Wait, what? A lot of PHP code use requires as functions? Honestly surprised here. I've never seen this.
Oddly, Rails partials work this way too. They can see the controller's instance variables and are often written without any sort of defined interface, which makes for confusing, brittle code. Fortunately Rails offers the option to pass in :locals (just as php offers the option of simply using functions instead of require).