I ran into the same problem just today: need to generate some urls within a library component and for that I need to give it the controller (which has url_for and the other helpers). The funny thing is, I am new to rails and was thinking how to do this more cleanly and how the good guys do this (anyone?), now this guy basically says go screw yourself, purists, I'll have it global. I'll stay with my hacky solution too I think.