KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Right now I have a navigation partial that looks like this (x10 buttons)... <% if current_controller == "territories" %> <li><%= link_to "Territories", {:controller => 'territories'}, :class => 'active' %></li> <% else %> <li><%= link_to "Territories", {:controller => 'territories'} %></li> <% end %> <% if current_controller == "contacts" %> <li><%= link_to "Contacts", {:controller => 'Contacts'}, :class => 'active' %></li> <% else %> <li><%= link_to "Contacts", {:controller => 'Contacts'} %></li> <% end %> Is there a more elegant/DRY solution for doing this?
Tags (comma-separated)
Save Edits
Cancel