Should Rails helpers assume an instance variable exists or should they receive them as parameters?
I'm wondering if there's a specific programming principle (Demeter?) that supports the idea that Rails helpers should never use controller instance variables, rather, they should receive such variables as function parameters. For example, assume my ChickensController#squawk action creates an instance variable called @egg . Furthermore, assume the squawk view contains a call to a helper called cockadoodledoo , implemented like so: def cockadoodledoo @egg.to_s end Would it be better or unnecessarily verbose to pass @egg as a parameter, such that the view calls cockadoodledoo(@egg) and for the