TLK
TLK

Reputation: 1770

How can I split seeds.rb to populated different data in development vs. production?

It looks like I could do this by specifying a constant in the environment files, but is the a more conventional way?

Upvotes: 0

Views: 154

Answers (1)

shingara
shingara

Reputation: 46914

You just need use the Rails.env to know which environnement you are and switch data.

Upvotes: 1

Related Questions