Skip to content

Instantly share code, notes, and snippets.

@breinz
Last active December 20, 2015 02:19
Show Gist options
  • Save breinz/6055550 to your computer and use it in GitHub Desktop.
Save breinz/6055550 to your computer and use it in GitHub Desktop.
def js_link_to(name=nil, html_options=nil, &block)
html_options ||= {}
html_options[:href] = "javascript:void(0)"
content_tag(:a, name, html_options, &block)
#link_to name, "javascript:void(0);", html_options
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment