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.
This commit is contained in:
Patrick Gansterer 2020-11-09 12:22:16 +01:00
parent 4043433539
commit b22dda4638

View file

@ -6,7 +6,7 @@ module Concerns::FoodcoopScope
extend ActiveSupport::Concern
included do
before_action :select_foodcoop
prepend_before_action :select_foodcoop
end
private