Finding controller/action from partial view

Hi

Is there a way to find out in a partial, rendered in all views, what
controller/action rendered the partial?

Cheers

Mark

Mark Goddard wrote:

Hi

Is there a way to find out in a partial, rendered in all views, what
controller/action rendered the partial?

Cheers

Mark

Figured it out

<%- if controller.controller_name == “foo” -%>
bar
<%- end -%>

<%- if controller.action_name == “foo” -%>
bar
<%- end -%>