On Oct 15, 10:48 am, Hyuuu Setiawan
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
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'')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---