Skip to content

Instantly share code, notes, and snippets.

@carlosbrando
Created February 11, 2009 11:36
Show Gist options
  • Select an option

  • Save carlosbrando/61969 to your computer and use it in GitHub Desktop.

Select an option

Save carlosbrando/61969 to your computer and use it in GitHub Desktop.
# Should prepare a formatted link in the following format:
# <li><a href="#"><span>Texto</span></a></li>
#
def menu_item(text, url)
span = content_tag(:span, text)
link = link_to(span, url, options_for(url))
content_tag(:li, link)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment