is there a way to know what action you're in?

I have a partial that is placed in many different pages, or, in rails
terms, participates in many different actions.

So, the partial _list.rhtml is on


and it's also on


I want the partial _list.rhtml to have different behaviors for show
and find. Is there an object available on a page, that contains the
controller and action for that page?


If you just want to know the action that was requested in the url,
params[:action] will have it

charlie caroff wrote:

Thank you. And, for the sake of other newbies like me,
params[:controller] has the controller name in it.


Sorry about that, I missed the part about the controller. Not enough
coffee yet :slight_smile:

charlie caroff wrote: