diff options
author | Kuldeep Aggarwal <kd.engineer@yahoo.co.in> | 2014-09-13 00:57:53 +0530 |
---|---|---|
committer | Kuldeep Aggarwal <kd.engineer@yahoo.co.in> | 2014-10-02 19:38:36 +0530 |
commit | a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e (patch) | |
tree | 7f2b7ae98adff47848f9533e9f2509d042f73c6e /actionview/lib | |
parent | 7b740f31cc6f88fe20a51eb7da1468082e6fdb5a (diff) | |
download | rails-a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e.tar.gz rails-a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e.tar.bz2 rails-a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e.zip |
do not generate blank options in mailTo
when mail_to generate blank options for any passed options(cc, bcc, body, subject)
then MICROSOFT OUTLOOK treats it differently and set wrong values in different options.
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/url_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index 364414da05..4c53b5df9e 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -458,8 +458,9 @@ module ActionView html_options = (html_options || {}).stringify_keys extras = %w{ cc bcc body subject }.map! { |item| - option = html_options.delete(item) || next - "#{item}=#{Rack::Utils.escape_path(option)}" + if option = html_options.delete(item).presence + "#{item}=#{Rack::Utils.escape_path(option)}" + end }.compact extras = extras.empty? ? '' : '?' + extras.join('&') |