harrystech/seed_migration — pull request #21 by uno4ki (2014-10-25 19:54:58+00:00)
Title: Adds support for custom "migrations_path"

Hi.

We're have huge project and your gem is lifesaver.

But I've created a little improvement which is very useful for us.

*config/initializers/seed_migration.rb*
```ruby
SeedMigration.config do |c|
c.migrations_path = File.join("seed", "development") if Rails.env.development?
c.migrations_path = File.join("seed", "test") if Rails.env.test?
c.migrations_path = File.join("seed", "production") if Rails.env.production?
end
```

I did this because:
- Tried to avoid "seeding" from schema migrations (this is real pain)
- Incrementally seed data in production
- Don't mess production/dev/test data into one seed

Of course if you need to share your "seed" across multiple environments, you should create something like "seed/shared/" and include these shared files into real migrations, but I think this is adequate trade off.

Enjoy :smile: