From dbb5f5438f7f98b595d2ef8b3b733abeda901553 Mon Sep 17 00:00:00 2001 From: Jason Barnabe Date: Mon, 15 Jan 2024 11:08:43 -0600 Subject: [PATCH] Rails 7.1 support FormOptionsHelper is no longer on Tags::Base - https://github.com/rails/rails/commit/77f3fc118a211c973bc3ca0b720dcba932474f89. --- lib/localized_country_select.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/localized_country_select.rb b/lib/localized_country_select.rb index bc3a9bd..1b03fec 100644 --- a/lib/localized_country_select.rb +++ b/lib/localized_country_select.rb @@ -57,7 +57,7 @@ module FormOptionsHelper # Country codes listed as an array of symbols in +priority_countries+ argument will be listed first # TODO : Implement pseudo-named args with a hash, not the "somebody said PHP?" multiple args sillines def localized_country_select(object, method, priority_countries = nil, options = {}, html_options = {}) - tag = CountrySelect.new(object, method, self, options) + tag = CountrySelect.new(object, method, self, LocalizedCountrySelect::localized_countries_array(options), :last, :first, options, html_options) tag.to_localized_country_select_tag(priority_countries, options, html_options) end @@ -102,7 +102,7 @@ def to_localized_country_select_tag(priority_countries, options, html_options) end end - class CountrySelect < Tags::Base + class CountrySelect < Tags::CollectionSelect include ToCountrySelectTag end