aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorMark Dodwell <mark@mkdynamic.co.uk>2014-12-20 15:50:09 -0800
committerMark Dodwell <mark@mkdynamic.co.uk>2014-12-20 15:50:09 -0800
commitfecbed6fb136a2f951633bd5b9632e75cc46f804 (patch)
treec399aa2576f0de9bd4facb1cee430d950c3ec121 /actionview/lib/action_view/helpers/url_helper.rb
parent4ad9d685815f27fe54aed2019755abf2ec8c2cf4 (diff)
downloadrails-fecbed6fb136a2f951633bd5b9632e75cc46f804.tar.gz
rails-fecbed6fb136a2f951633bd5b9632e75cc46f804.tar.bz2
rails-fecbed6fb136a2f951633bd5b9632e75cc46f804.zip
Add support for Reply-To field in mail_to helper
Diffstat (limited to 'actionview/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb5
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..8c2d5705f1 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -428,6 +428,7 @@ module ActionView
# * <tt>:body</tt> - Preset the body of the email.
# * <tt>:cc</tt> - Carbon Copy additional recipients on the email.
# * <tt>:bcc</tt> - Blind Carbon Copy additional recipients on the email.
+ # * <tt>:reply_to</tt> - Preset the Reply-To field of the email.
#
# ==== Obfuscation
# Prior to Rails 4.0, +mail_to+ provided options for encoding the address
@@ -457,9 +458,9 @@ module ActionView
html_options, name = name, nil if block_given?
html_options = (html_options || {}).stringify_keys
- extras = %w{ cc bcc body subject }.map! { |item|
+ extras = %w{ cc bcc body subject reply_to }.map! { |item|
option = html_options.delete(item) || next
- "#{item}=#{Rack::Utils.escape_path(option)}"
+ "#{item.dasherize}=#{Rack::Utils.escape_path(option)}"
}.compact
extras = extras.empty? ? '' : '?' + extras.join('&')