diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index 31e123d916265..cda3ec51095c5 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Remove passing the prompt to `grouped_options_for_select` as an argument, because
+ it was deprecated.
+
+ *kennyj*
+
* Always escape the result of `link_to_unless` method.
Before:
diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb
index ab5aae9b13686..4e9ef94ff3335 100644
--- a/actionview/lib/action_view/helpers/form_options_helper.rb
+++ b/actionview/lib/action_view/helpers/form_options_helper.rb
@@ -510,15 +510,8 @@ def option_groups_from_collection_for_select(collection, group_method, group_lab
# Note: Only the and tags are returned, so you still have to
# wrap the output in an appropriate tag.
def grouped_options_for_select(grouped_options, selected_key = nil, options = {})
- if options.is_a?(Hash)
- prompt = options[:prompt]
- divider = options[:divider]
- else
- prompt = options
- 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
- end
+ prompt = options[:prompt]
+ divider = options[:divider]
body = "".html_safe
diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb
index 1715902927b3c..8c90a58a84d27 100644
--- a/actionview/test/template/form_options_helper_test.rb
+++ b/actionview/test/template/form_options_helper_test.rb
@@ -310,15 +310,6 @@ def test_grouped_options_for_select_with_optional_divider
)
end
- def test_grouped_options_for_select_with_selected_and_prompt_deprecated
- assert_deprecated 'Passing the prompt to grouped_options_for_select as an argument is deprecated. Please use an options hash like `{ prompt: "Choose a product..." }`.' do
- assert_dom_equal(
- "",
- grouped_options_for_select([["Hats", ["Baseball Cap","Cowboy Hat"]]], "Cowboy Hat", "Choose a product...")
- )
- end
- end
-
def test_grouped_options_for_select_with_selected_and_prompt
assert_dom_equal(
"",
@@ -337,14 +328,6 @@ def test_grouped_options_for_select_returns_html_safe_string
assert grouped_options_for_select([["Hats", ["Baseball Cap","Cowboy Hat"]]]).html_safe?
end
- def test_grouped_options_for_select_with_prompt_returns_html_escaped_string_deprecated
- ActiveSupport::Deprecation.silence do
- assert_dom_equal(
- "",
- grouped_options_for_select([["Hats", ["Baseball Cap","Cowboy Hat"]]], nil, ''))
- end
- end
-
def test_grouped_options_for_select_with_prompt_returns_html_escaped_string
assert_dom_equal(
"",