Detecting what action I'm on?

Surely there has to be an easy answer to this question, but it’s eluding
me. While rendering my rhtml, I’d like it to know what action it is
currently rendering. This is for a context sensitive partial that will
display itself differently depending on who called it. I can pass in a
parameter, but I’d rather not repeat myself if there’s something already
there waiting to be called. Thanks!

Hi Duanne

How about

<%= controller.action_name %>

On Oct 22, 10:28 pm, Duane M. [email protected]

That’ll work! Thanks CCH.

CCH wrote:

Hi Duanne

How about

<%= controller.action_name %>

On Oct 22, 10:28 pm, Duane M. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs