I think it would be beneficial to loop over the array of paths in
paths["db/seeds.rb"] instead of just grabbing the first one and loading it.
Might be good to rename it"db/seeds" and prefill it with "db/seed.rb" then.

This would especially be helpful in engines that already add migrations.
Right now this can still be achieved by hooking into the rake task but it's
not as great (either runs after the app's seeds that may be dependent on it
or it runs before the whole task, missing the abort_if_pending_migrations
check which loads the environment and config).

If this is something you'd be interested in, I can create a pull request!

https://github.com/rails/rails/blob/8898a0ae2a0d5c8826fe08bbf4ccd10745802f9e/railties/lib/rails/engine.rb#L548
https://github.com/rails/rails/blob/fdc219e0f857c372748296eae9cc5828ffb2c2c3/activerecord/lib/active_record/railties/databases.rake

Thanks,
Tom

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to