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
  • 173,507
  • 49
  • 363
  • 364
userden
  • 1,615
  • 6
  • 26
  • 50

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,989
  • 6
  • 29
  • 54