How can I get in the …\layouts\application.rhtml the “name” of the
current Controller?
//I need to set the var page_id:
<% @page_id = “…current_controler”%>
//to build correctly the menu
<%= menu_builder(@page_id) %>
Thanks
How can I get in the …\layouts\application.rhtml the “name” of the
current Controller?
//I need to set the var page_id:
<% @page_id = “…current_controler”%>
//to build correctly the menu
<%= menu_builder(@page_id) %>
Thanks
This is my first response…so take it for what it’s worth
<%= controller.controller_name %>
or
<% @page_id = controller.controller_name %>
<%= controller.controller_name %>
Scott Caldwell wrote:
This is my first response…so take it for what it’s worth
<%= controller.controller_name %>
or
<% @page_id = controller.controller_name %>
It Works,
thank You very much for You help
No problem…glad to give a tiny bit back…
-Scott
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs