Skip to content

Instantly share code, notes, and snippets.

@kent
Created May 20, 2009 03:21
Show Gist options
  • Save kent/114590 to your computer and use it in GitHub Desktop.
Save kent/114590 to your computer and use it in GitHub Desktop.
def layout_link_to(link_text, path)
curl = url_for(:controller => request.path_parameters['controller'],
:action => request.path_parameters['action'])
html = ''
options = path == curl ? {:class => 'current'} : {}
html << content_tag("li", link_to(link_text, path, options))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment