From b22dda4638570d202944c0dcd11c0dae434cacff Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Mon, 9 Nov 2020 12:22:16 +0100 Subject: [PATCH] Run select_foodcoop as the first before_action When e.g. authenticate is run as before_action, it could use the wrong database in a multicoop installation, if select_foodcoop is not run first. --- app/controllers/concerns/foodcoop_scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/foodcoop_scope.rb b/app/controllers/concerns/foodcoop_scope.rb index 37d2aa82..416ad2ee 100644 --- a/app/controllers/concerns/foodcoop_scope.rb +++ b/app/controllers/concerns/foodcoop_scope.rb @@ -6,7 +6,7 @@ module Concerns::FoodcoopScope extend ActiveSupport::Concern included do - before_action :select_foodcoop + prepend_before_action :select_foodcoop end private