Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

current_page? method

There is a way to insert all the pages of a controller in the current_page?() method?

<%if (!current_page?(:controller=>'users'))%>
    ...
<%end>

If I don't insert the :action attribute don't work!

I must to insert the attribute :action if i want to make a control for a specific action.

I would to consider all of the pages of the controller named users.

like image 208
Giacomo Delfini Avatar asked May 12 '26 07:05

Giacomo Delfini


1 Answers

Instead of using current_page, you can check the controller name directly:

<% if controller.controller_name != "users" %>
...
<% end %>
like image 197
Logan Leger Avatar answered May 13 '26 19:05

Logan Leger