On 8/22/05, klmn <kelemen-3bu9hXS+wrdaa/9Udqfwiw@public.gmane.org>
wrote:> I want to generate different submenu for menu items, how do I find out
whats the
> current processed controller and its method ?
>
> For example:
> my url is : http://whateverIP/users/list
> I want to generate different submenu when I''m working with
UsersController::
> methods, than other controller.
According to the API docs:
http://rails.rubyonrails.com/classes/ActionController/Base.html ,
you''re looking for controller_name and action_name. If you want to
access these in a view instead of the controller, I believe it''s
<%controller.controller_name %> and <%= controller.action_name %>
--
rick
http://techno-weenie.net