Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Created April 7, 2010 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donpdonp/358343 to your computer and use it in GitHub Desktop.
Save donpdonp/358343 to your computer and use it in GitHub Desktop.
<% menu_options = [:root => "Home", :blog => "Blog"] %>
<% menu_options.each do |k,v| %>
<li>
<%= link_to v,
send(k.to_s+"_index_path"),
{}.merge(:class => "something") if controller.name == k) %>
</li>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment