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,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
|
||||||
|
|
Loading…
Add table
Reference in a new issue