If... what?

I have a simple div in my layout that I would like to change depending
on the action. For instance in the account/signup I would like it to
use

but in account/login I would like it to use

I’m trying to find the right if statement to use here… I thought that
maybe:

if :action => login would work but it doesn’t…

thanks…

Try controller.action_name or controller.controller_name

Vince W. wrote:

I have a simple div in my layout that I would like to change depending
on the action. For instance in the account/signup I would like it to
use

but in account/login I would like it to use

I’m trying to find the right if statement to use here… I thought that
maybe:

if :action => login would work but it doesn’t…

thanks…

or, from a helper:

def sidebar_id(action)
action = action.to_s
case action
when ‘signup’ : ‘register’
when ‘foo’ : ‘bar’
else : action
end
end

View