Forum: Ruby on Rails check for which page the helper is in

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Hyuuu S. (Guest)
on 2008-10-15 06:48
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 :)
Erol F. (Guest)
on 2008-10-15 12:39
(Received via mailing list)
On Oct 15, 10:48 am, Hyuuu S. <removed_email_address@domain.invalid>
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 :)
> --
> Posted viahttp://www.ruby-forum.com/.

current_page?(:controller => 'user', :action => 'index')
This topic is locked and can not be replied to.