Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Deprecate country_select for 2.1, it's gone in 2.2

You can install the country_select plugin to obtain the same, possibly controversial, list of countries.
  • Loading branch information...
commit 2d4e5964786b3ad9b40e3808832088a99c88d412 1 parent 3f8c42b
@NZKoz NZKoz authored
View
1  actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -400,6 +400,7 @@ def to_collection_select_tag(collection, value_method, text_method, options, htm
end
def to_country_select_tag(priority_countries, options, html_options)
+ ActiveSupport::Deprecation.warn("country_select is deprecated, please install the country_select plugin at http://github.com/rails/country_select/", caller)
html_options = html_options.stringify_keys
add_default_name_and_id(html_options)
value = value(object)
View
12 actionpack/test/template/form_options_helper_test.rb
@@ -656,7 +656,9 @@ def test_country_select
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option></select>
COUNTRIES
- assert_dom_equal(expected_select[0..-2], country_select("post", "origin"))
+ assert_deprecated 'plugin' do
+ assert_dom_equal(expected_select[0..-2], country_select("post", "origin"))
+ end
end
def test_country_select_with_priority_countries
@@ -911,7 +913,9 @@ def test_country_select_with_priority_countries
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option></select>
COUNTRIES
- assert_dom_equal(expected_select[0..-2], country_select("post", "origin", ["New Zealand", "Nicaragua"]))
+ assert_deprecated 'plugin' do
+ assert_dom_equal(expected_select[0..-2], country_select("post", "origin", ["New Zealand", "Nicaragua"]))
+ end
end
def test_country_select_with_selected_priority_country
@@ -1166,7 +1170,9 @@ def test_country_select_with_selected_priority_country
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option></select>
COUNTRIES
- assert_dom_equal(expected_select[0..-2], country_select("post", "origin", ["New Zealand", "Nicaragua"]))
+ assert_deprecated 'plugin' do
+ assert_dom_equal(expected_select[0..-2], country_select("post", "origin", ["New Zealand", "Nicaragua"]))
+ end
end
def test_time_zone_select
Please sign in to comment.
Something went wrong with that request. Please try again.