Skip to content

Instantly share code, notes, and snippets.

@doombongo
Created December 3, 2012 19:12
Show Gist options
  • Save doombongo/4197199 to your computer and use it in GitHub Desktop.
Save doombongo/4197199 to your computer and use it in GitHub Desktop.
current is a red arrow sitting next to the nav link
<li> <%= link_to "About Us", about_path, class: "#{cp(about_path)} link" %></li>
module ApplicationHelper
def cp(*paths)
paths.each do |path|
"current" if current_page?(path)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment