mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
The initializer ran code the needs the database in the migrated state. The decision is to not initialize anything relative to feature. This has to be done within the FlipperUI by the instance managers.
12 lines
339 B
Ruby
12 lines
339 B
Ruby
require "flipper"
|
|
require "flipper/adapters/active_record"
|
|
|
|
Flipper.configure do |config|
|
|
config.default do
|
|
Flipper.new(Flipper::Adapters::ActiveRecord.new)
|
|
end
|
|
end
|
|
Rails.configuration.middleware.use Flipper::Middleware::Memoizer, preload_all: true
|
|
|
|
Flipper.register(:admins) { |actor| actor.respond_to?(:admin?) && actor.admin? }
|