From ecd7b16ef515584127a5867c58e9a13a82cff4c6 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 19 Feb 2015 11:09:43 +1100 Subject: [PATCH] revert setting default country by name in enterprise controller --- app/controllers/admin/enterprises_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/enterprises_controller.rb b/app/controllers/admin/enterprises_controller.rb index ac852c0886..503fd736ba 100644 --- a/app/controllers/admin/enterprises_controller.rb +++ b/app/controllers/admin/enterprises_controller.rb @@ -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_name(ENV['DEFAULT_COUNTRY']) + enterprise.address.country = Spree::Country.find_by_id(Spree::Config[:default_country_id]) enterprise end alias_method_chain :build_resource, :address