make multicoops:run also work on single coop

This commit is contained in:
wvengen 2014-05-30 12:13:09 +02:00
parent 7b51f7aabe
commit 34f85895c5
1 changed files with 7 additions and 3 deletions

View File

@ -31,9 +31,13 @@ class FoodsoftConfig
# Loop through each foodcoop and executes the given block after setup config and database
def each_coop
APP_CONFIG.keys.reject { |coop| coop =~ /^(default|development|test|production)$/ }.each do |coop|
select_foodcoop coop
yield coop
if config[:multi_coop_install]
APP_CONFIG.keys.reject { |coop| coop =~ /^(default|development|test|production)$/ }.each do |coop|
select_foodcoop coop
yield coop
end
else
yield config[:default_scope]
end
end