We should add two kinds of seeds:
- Development seeds: These seeds should contain example information and will also be used in staging environments as example data. Would be great to have them documented in the README, at least its login information.
- Production seeds: Should contain the bare essentials to run a production environment; probably just a system admin. They should be documented as well.
Note that each engine should contain its own seeds. We can sort of handle this in several ways:
- Providing a single
Decidim.seed method, and have all engines register seeds via a Decidim.register_seed method somewhere
- We could broadcast a
seed signal when the seeds are run and capture them via ActiveSupport::Notifications. That could also be the beginning of a broader-size pub-sub mechanism between engines.
- We could just run all seeds separately (
Decidim::Core.seed, Decidim::System.seed and Decidim::Admin.seed) and put them into seeds.rb via the app generator, but that's sub-optimal and doesn't scale if we end up adding more engines.
I personally prefer 1) or 2) but that's up to the implementer.
We should add two kinds of seeds:
Note that each engine should contain its own seeds. We can sort of handle this in several ways:
Decidim.seedmethod, and have all engines register seeds via aDecidim.register_seedmethod somewhereseedsignal when the seeds are run and capture them viaActiveSupport::Notifications. That could also be the beginning of a broader-size pub-sub mechanism between engines.Decidim::Core.seed,Decidim::System.seedandDecidim::Admin.seed) and put them intoseeds.rbvia the app generator, but that's sub-optimal and doesn't scale if we end up adding more engines.I personally prefer 1) or 2) but that's up to the implementer.