Skip to content

Instantly share code, notes, and snippets.

@jqr
Created May 6, 2010 20:18
Show Gist options
  • Save jqr/392655 to your computer and use it in GitHub Desktop.
Save jqr/392655 to your computer and use it in GitHub Desktop.
# Adds rel="nofollow" and auto_link class to all links by default.
def auto_link(text, options = {}, &block)
super(text, options.reverse_merge(:link => :all, :html => { :rel => :nofollow, :class => 'auto_link' }), &block)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment