aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-10-29 08:42:16 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-10-29 08:42:16 -0700
commitd1c95d912ec39e7e374aee605a1d6fb11f8521d7 (patch)
tree9ec15855e1cab91c346d5a09e6adb593c7585608 /actionpack/lib/action_view/helpers/url_helper.rb
parent72e6fb005fbdd211883282fc761d3ded23ef7fbb (diff)
parent0b7067d8497c4d832b32233888ce973ab4357e5d (diff)
downloadrails-d1c95d912ec39e7e374aee605a1d6fb11f8521d7.tar.gz
rails-d1c95d912ec39e7e374aee605a1d6fb11f8521d7.tar.bz2
rails-d1c95d912ec39e7e374aee605a1d6fb11f8521d7.zip
Merge pull request #8063 from nikitug/deprecation_caller_context
Provide a call stack for deprecation warnings where needed.
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 5105d0e585..4d6367e66a 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -577,7 +577,9 @@ module ActionView
method = html_options.delete('method')
if confirm
- ActiveSupport::Deprecation.warn ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead"
+ message = ":confirm option is deprecated and will be removed from Rails 4.1. " /
+ "Use ':data => { :confirm => \'Text\' }' instead."
+ ActiveSupport::Deprecation.warn(message, caller)
html_options["data-confirm"] = confirm
end
@@ -585,7 +587,9 @@ module ActionView
add_method_to_attributes!(html_options, method) if method
if disable_with
- ActiveSupport::Deprecation.warn ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead"
+ message = ":disable_with option is deprecated and will be removed from Rails 4.1. " /
+ "Use ':data => { :disable_with => \'Text\' }' instead."
+ ActiveSupport::Deprecation.warn(message, caller)
html_options["data-disable-with"] = disable_with
end