Merge pull request #479 from foodcoop1040/default_scope
Fall back to default_scope if an invalid foodcoop is provided
This commit is contained in:
commit
03256d28dd
1 changed files with 1 additions and 0 deletions
|
@ -172,6 +172,7 @@ class ApplicationController < ActionController::Base
|
||||||
# Set Config and database connection
|
# Set Config and database connection
|
||||||
FoodsoftConfig.select_foodcoop params[:foodcoop]
|
FoodsoftConfig.select_foodcoop params[:foodcoop]
|
||||||
rescue => error
|
rescue => error
|
||||||
|
FoodsoftConfig.select_foodcoop FoodsoftConfig.config[:default_scope]
|
||||||
redirect_to root_url, alert: error.message
|
redirect_to root_url, alert: error.message
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue