mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Simplify Address code
The DefaultCountry code has a fallback already.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user