Displaying 1 result from an estimated 1 matches for "hide_admin".
2005 Dec 02
0
RE: How to test for controller
There is a reason the controller is called *controller*. The controller
should be making this type of decision.
I would do it this way:
Class FooController < ApplicationController
def bar
@side_nav = :display_admin
End
def baz
@side_nav = :hide_admin
EndEnd
In the view:
<% if @side_nav == :display_admin %>
...
<% end %>
In your application controller, you can set a default value for the
@side_nav variable to avoid needing to set it in every action
-----Original Message-----
From: Rick Olson [mailto:technoweenie-Re5JQEeQqe...