Enterprise and Group controllers use default country instead of default country id

This commit is contained in:
Maikel Linke
2015-01-22 16:22:34 +11:00
parent 7a48d7fe22
commit d93a8b6428
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ module Admin
def build_resource_with_address
enterprise_group = build_resource_without_address
enterprise_group.address = Spree::Address.new
enterprise_group.address.country = Spree::Country.find_by_id(Spree::Config[:default_country_id])
enterprise_group.address.country = Spree::Country.find_by_name(ENV['DEFAULT_COUNTRY'])
enterprise_group
end
alias_method_chain :build_resource, :address

View File

@@ -59,7 +59,7 @@ module Admin
def build_resource_with_address
enterprise = build_resource_without_address
enterprise.address = Spree::Address.new
enterprise.address.country = Spree::Country.find_by_id(Spree::Config[:default_country_id])
enterprise.address.country = Spree::Country.find_by_name(ENV['DEFAULT_COUNTRY'])
enterprise
end
alias_method_chain :build_resource, :address