Skip to content

Instantly share code, notes, and snippets.

@maylogger
Created February 1, 2013 09:10
Show Gist options
  • Select an option

  • Save maylogger/4690240 to your computer and use it in GitHub Desktop.

Select an option

Save maylogger/4690240 to your computer and use it in GitHub Desktop.
nav link has current status
module ViewHelpers
def nav_link_to(name, href, options={})
if href == request.path
active = "active"
end
content_tag(:li, link_to(name, href, options), :class => active )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment