seedbank icon indicating copy to clipboard operation
seedbank copied to clipboard

Force common/setup to run before any individual seed

Open swrobel opened this issue 6 years ago • 1 comments

The example rake db:seed:development:users seems to actually only run db/seeds/development/users.seeds.rb. Is there any way to force some common/shared code to load beforehand without having to do after or require in every single individual seed file?

swrobel avatar Mar 21 '18 01:03 swrobel

There currently isn’t. It wouldn’t be hard fo add a global.seeds.rb dependency and I’d happily accept a PR for it.

On 21 Mar 2018, 08:45 +0700, Stefan Wrobel [email protected], wrote:

The example rake db:seed:development:users seems to actually only run db/seeds/development/users.seeds.rb. Is there any way to force some common/shared code to load beforehand without having to do after or require in every single individual seed file? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

james2m avatar Mar 21 '18 15:03 james2m