Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/action_view/encoded_mail_to/mail_to_with_encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ def mail_to(email_address, name = nil, html_options = {}, &block)
html_options, name = name || {}, nil if block_given? && html_options.blank?
html_options.stringify_keys!
if %w[encode replace_at replace_dot].none?{ |option| html_options.has_key? option }
super email_address, name, html_options, &block
if block_given?
super email_address, html_options, nil, &block
else
super email_address, name, html_options, &block
end
else
_mail_to_with_encoding email_address, name, html_options, &block
end
Expand Down