diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 6b3d80cbf0..dec87013d3 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -519,7 +519,7 @@ def grouped_options_for_select(grouped_options, selected_key = nil, options = {} else prompt = options options = {} - message = "Passing the prompt to grouped_options_for_select as an argument is deprecated. " / + message = "Passing the prompt to grouped_options_for_select as an argument is deprecated. " \ "Please use an options hash like `{ prompt: #{prompt.inspect} }`." ActiveSupport::Deprecation.warn(message, caller) end diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index c92b38e2b9..11bc0cbec8 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -425,16 +425,16 @@ def submit_tag(value = "Save changes", options = {}) options = options.stringify_keys if disable_with = options.delete("disable_with") - message = ":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) options["data-disable-with"] = disable_with end if confirm = options.delete("confirm") - message = ":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) options["data-confirm"] = confirm @@ -487,16 +487,16 @@ def button_tag(content_or_options = nil, options = nil, &block) options = options.stringify_keys if disable_with = options.delete("disable_with") - message = ":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) options["data-disable-with"] = disable_with end if confirm = options.delete("confirm") - message = ":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) options["data-confirm"] = confirm @@ -541,8 +541,8 @@ def image_submit_tag(source, options = {}) options = options.stringify_keys if confirm = options.delete("confirm") - message = ":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) options["data-confirm"] = confirm diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 4d6367e66a..2a1dd86e0a 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -577,8 +577,8 @@ def convert_options_to_data_attributes(options, html_options) method = html_options.delete('method') if confirm - message = ":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 @@ -587,8 +587,8 @@ def convert_options_to_data_attributes(options, html_options) add_method_to_attributes!(html_options, method) if method if disable_with - message = ":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 diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index 32a9152707..086cc0bacc 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -235,7 +235,7 @@ def extract_handler_and_format(path, default_formats) extension = pieces.pop unless extension - message = "The file #{path} did not specify a template handler. The default is currently ERB, " / + message = "The file #{path} did not specify a template handler. The default is currently ERB, " \ "but will change to RAW in the future." ActiveSupport::Deprecation.warn(message, caller) end diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 945dff2a29..0a94fa079b 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -411,7 +411,7 @@ def test_submit_tag_with_confirmation end def test_submit_tag_with_deprecated_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %(), submit_tag("Save", :confirm => "Are you sure?") @@ -478,7 +478,7 @@ def test_button_tag_with_confirmation end def test_button_tag_with_deprecated_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %(), button_tag("Save", :type => "submit", :confirm => "Are you sure?") @@ -494,7 +494,7 @@ def test_image_submit_tag_with_confirmation end def test_image_submit_tag_with_deprecated_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %(), image_submit_tag("save.gif", :confirm => "Are you sure?") diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index bbfdf7f944..1bb625213d 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -95,7 +95,7 @@ def test_button_to_with_javascript_confirm end def test_button_to_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{
}, button_to("Hello", "http://www.example.com", confirm: "Are you sure?") @@ -111,7 +111,7 @@ def test_button_to_with_javascript_disable_with end def test_button_to_with_javascript_deprecated_disable_with - assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead" do + assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use 'data: { disable_with: \'Text\' }' instead" do assert_dom_equal( %{
}, button_to("Hello", "http://www.example.com", disable_with: "Greeting...") @@ -134,7 +134,7 @@ def test_button_to_with_remote_and_javascript_confirm end def test_button_to_with_remote_and_javascript_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{
}, button_to("Hello", "http://www.example.com", remote: true, confirm: "Are you sure?") @@ -150,7 +150,7 @@ def test_button_to_with_remote_and_javascript_disable_with end def test_button_to_with_remote_and_javascript_deprecated_disable_with - assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead" do + assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use 'data: { disable_with: \'Text\' }' instead" do assert_dom_equal( %{
}, button_to("Hello", "http://www.example.com", remote: true, disable_with: "Greeting...") @@ -267,19 +267,19 @@ def test_link_tag_with_javascript_confirm end def test_link_tag_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{Hello}, link_to("Hello", "http://www.example.com", confirm: "Are you sure?") ) end - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{Hello}, link_to("Hello", "http://www.example.com", confirm: "You cant possibly be sure, can you?") ) end - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{Hello}, link_to("Hello", "http://www.example.com", confirm: "You cant possibly be sure,\n can you?") @@ -351,7 +351,7 @@ def test_link_tag_using_post_javascript_and_confirm end def test_link_tag_using_post_javascript_and_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{Hello}, link_to("Hello", "http://www.example.com", method: :post, confirm: "Are you serious?") @@ -367,7 +367,7 @@ def test_link_tag_using_delete_javascript_and_href_and_confirm end def test_link_tag_using_delete_javascript_and_href_and_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{Destroy}, link_to("Destroy", "http://www.example.com", method: :delete, href: '#', confirm: "Are you serious?")