- Storybook need to access through a GET method on `/rails/stories/**` served by `ViewComponent::Storybook::StoriesController`
- Configure exact policy with an initialized filter
- Via `view_component_storybook` : https://github.com/jonspalmer/view_component_storybook
- Configure both `view_component_storybook` and `storybook`
- Add two addons: `@storybook/addon-docs` and `@storybook/addon-controls`
Update config comment for clarity
This keeps the `OrderBalance` abstraction but removes the old code now
that the feature is enabled for all users in all instances and there are
no bugs reported. It's become dead code.
Rails 5.2 has changed the way initializers are called during certain rake tasks including `db:create`. Initializers that were previously not loaded are now loaded (basically the whole app is loaded). This means any calls to #table_exists? that appear in the app will throw fatal errors as the database doesn't exist yet during that task, but those calls are made before `db:create` has even started, which means the database can't be created.
There are also a few other places in Spree code where #table_exists? is called, and they already call #connected? first to guard against this issue.
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.
- Use the ActiveRecord adapter
- Use a middle to cache data through memoization (see https://github.com/jnunemaker/flipper/blob/master/docs/Optimization.md)
- Create the group `admins`: only user which are admins
- Create `unit_price` feature attached to `admins` group
- Add method `flipper_id` on User
- Also add flipper-ui to have a small UI that can be used by each instance admin to manage feature toggle
- Mount on `/admin/feature-toggle` with same restriction as `/admin`
A spec failed with this message:
ActiveRecord::ConnectionTimeoutError:
could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
The error seems to be raised when trying to authenticate the user
through Devise in a before_action block. Increasing the pool size by one
helped.
I don't know why our app needs more than 5 connections at the same time.
Maybe some gem "forgets" to release connections?