Skip to content

Instantly share code, notes, and snippets.

@burnto
Created June 2, 2009 20:20
Show Gist options
  • Save burnto/122551 to your computer and use it in GitHub Desktop.
Save burnto/122551 to your computer and use it in GitHub Desktop.
def mail_to_obf(email_address, name = nil, html_options = {})
substr = ' *AT* '
ej = email_address.gsub(/@/, substr)
mt = mail_to(ej, name || ej, html_options)
javascript_tag("document.write('#{mt}'.replace('#{substr}', '@', 'g'))")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment