In rails, page templates have their own controller which is called before a page is rendered (I think?).
Likewise, can I have a controller associated with a partial that is called before the partial is rendered?
I know you can pass local variable into a partial, but I want to run a good few lines of code to assign those local variables, which if I wasn't using a partial I would have put in the controller.