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

View file

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