actionview-encoded_mail_to icon indicating copy to clipboard operation
actionview-encoded_mail_to copied to clipboard

Options can now be passed as html safe strings

Open vlado opened this issue 7 years ago • 0 comments

If you call mail_to("[email protected]", "My email", subject: "Example subject", encode: "javascript") in Rails 5 subject option will be passed as ActiveSupport::SafeBuffer and not as String. When this option reaches Rack::Utils.escape_path it will throw NoMethodError: undefined method 'each_byte' for nil:NilClass. This is fixed by replacing extras builder with implementation from latest Rails which uses ERB::Util.url_encode instead of Rack::Utils.escape_path.

vlado avatar Mar 24 '17 21:03 vlado