diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 6f05881d08..d044afa6e6 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -628,8 +628,13 @@ module ActionView html_options["data-disable-with"] = disable_with end - html_options["data-confirm"] = confirm if confirm - add_method_to_attributes!(html_options, method) if method + if confirm + ActiveSupport::Deprecation.warn ":confirm option is deprecated and will be removed from Rails 4.0. Use ':data => { :confirm => \'Text\' }' instead" + + html_options["data-confirm"] = confirm + end + + add_method_to_attributes!(html_options, method) if method html_options else |