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!