0

I can use rake db:seed to seed an existing database. However, in a multitenant app, using subdomains, how could I seed data for a new user account?

Should I not use seed.rb, but create seeded data with a migration?

Simone Carletti
  • 168,884
  • 43
  • 353
  • 360
userden
  • 1,441
  • 4
  • 24
  • 45

1 Answers1

1

You can pass parameters as illustrated here: Can I pass an argument to rake db:seed?

Then you can use switch and if statements to load/change either the data or use a different connection.

Community
  • 1
  • 1
codingbunny
  • 3,889
  • 6
  • 28
  • 54