Skip to content

Instantly share code, notes, and snippets.

View reed's full-sized avatar

Nick Reed reed

  • BioZyme, Inc.
  • Kansas City, Missouri
View GitHub Profile
@reed
reed / mail_to_fix.rb
Created December 9, 2012 01:48
Rails mail_to method fix for turbolinks
module ActionView
module Helpers
module UrlHelper
def mail_to(email_address, name = nil, html_options = {})
email_address = ERB::Util.html_escape(email_address)
html_options = html_options.stringify_keys
encode = html_options.delete("encode").to_s
extras = %w{ cc bcc body subject }.map { |item|