make multicoops:run also work on single coop
This commit is contained in:
parent
7b51f7aabe
commit
34f85895c5
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue