Simplify Address code

The DefaultCountry code has a fallback already.
This commit is contained in:
Maikel Linke
2022-11-02 16:11:30 +11:00
parent 392aeb7321
commit a2c4242994

View File

@@ -29,12 +29,7 @@ module Spree
delegate :name, to: :state, prefix: true, allow_nil: true
def self.default
country = begin
DefaultCountry.country
rescue StandardError
Spree::Country.first
end
new(country: country)
new(country: DefaultCountry.country)
end
def full_name