Return Rendering Controller In View


#1

I have a shared partial which could be rendered by two different
controllers. Is there an easy way in the view to return which
controller rendered the partial? I’ve tried using:

<%debug(params[‘controller’])%>

While that does return what I need it seems like a kludgy fit since
debug is not meant to be used for that.

Thanks,

LarsenMTL


#2

Try:

controller.controller_name
controller.action_name

** This was offered in response to a post of mine but I haven’t tried it
yet.


#3

Simple, clean and worked like a charm. I knew I was missing something.

Thanks a lot.