From 98063dae60e56aeb68b8fededaf4680c91a7da30 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 19 Feb 2015 16:57:19 +1100 Subject: [PATCH] setting default country by id in groups controller --- app/controllers/admin/enterprise_groups_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/enterprise_groups_controller.rb b/app/controllers/admin/enterprise_groups_controller.rb index 7759f57c12..32280b7fa3 100644 --- a/app/controllers/admin/enterprise_groups_controller.rb +++ b/app/controllers/admin/enterprise_groups_controller.rb @@ -27,7 +27,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_name(ENV['DEFAULT_COUNTRY']) + enterprise_group.address.country = Spree::Country.find_by_id(Spree::Config[:default_country_id]) enterprise_group end alias_method_chain :build_resource, :address