Finding the current controller?

hello all,

here’s the code from my layout

<% if controller = @admin then %>

<li class="selected"><%= link_to 'Home', :controller => 'admin' 

%>

<% else %>

  • <%= link_to 'Home', :controller => 'admin' %>
  • <% end %>

    if anyone knows why this wouldn’t work, help would be very appreciated.
    thanks…

    Jon.

    <% if controller = @admin then %>
    should be

    <% if controller == @admin then %>

    On Thursday, July 06, 2006, at 8:50 PM, Jon Mr wrote:

    Posted via http://www.ruby-forum.com/.


    Rails mailing list
    [email protected]
    http://lists.rubyonrails.org/mailman/listinfo/rails

    Mikkel B.

    www.strongside.dk - Football Portal(DK)
    ting.minline.dk - Buy Old Stuff!(DK)

    This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

    | Privacy Policy | Terms of Service | Remote Ruby Jobs