Skip to content

Commit

Permalink
Add countries_for_collection_select helper
Browse files Browse the repository at this point in the history
Needed for performance testing
  • Loading branch information
mdesantis committed Jan 15, 2019
1 parent 69e6932 commit e3ae5c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/app/helpers/spree/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def available_countries(restrict_to_zone: Spree::Config[:checkout_zone])
countries = Country.all
end

Spree::CountryListPresenter.new(countries)
end

def countries_for_collection_select(countries)
country_names = Carmen::Country.all.map do |country|
[country.code, country.name]
end.to_h
Expand Down

0 comments on commit e3ae5c9

Please sign in to comment.