params[:controller]
params[:action]
> In this template I'm constructing some links to specific parameter
> calls of this same template, and I need to know which controller was
> used and what action was called to get us here. I thought it was
> something like this:
>
> link_to "This Year", :controller => @controller.name, :action =>
> @controller.action
Use url_for (or a named route), then _don't_ pass the controller in. Url_for
will find the controller in params if you don't pass it in.
(Write tests for all this stuff, using assert_xpath, to detect you are getting
the links you expect!)