Check for which page the helper is in

I want to check which controller or action I am currently in, I can
access controller.controller_name but is there a more elegant way to do
it?
Something like, am_I_in {:controller=>‘user’,:action=>‘index’} or
am_I_in ‘/user/index’

Thanks :slight_smile:

On Oct 15, 10:48 am, Hyuuu S. [email protected]
wrote:

I want to check which controller or action I am currently in, I can
access controller.controller_name but is there a more elegant way to do
it?
Something like, am_I_in {:controller=>‘user’,:action=>‘index’} or
am_I_in ‘/user/index’

Thanks :slight_smile:

Posted viahttp://www.ruby-forum.com/.

current_page?(:controller => ‘user’, :action => ‘index’)