Skip to content

Maintaining Seed Data

Shri Hari L edited this page Mar 31, 2021 · 2 revisions

We use seedbank for maintaining our seed data. ✨

Our db/seeds workflow would be,

+ db
  + seeds
    + development
       user.seeds.rb          # Only seeded on development
       superuser.seeds.rb     # Only seeded on development
    + production
       settings.seeds.rb      # Only seeded on production
    seeds.rb                  # Common seeds

We can now also run seed commands in specific like,

rails db:seed:development to seed all *.seeds.rb in development folder. More Examples

Clone this wiki locally