Closed davidkelley closed 10 years ago
Thanks for the commit. I haven't done much with engines, but this definitely makes sense. I was never thrilled with the way I was doing it. I'll push this out next time I push a new version.
Cheers, Jason
No problem. I'm in the middle of implementing your gem into a Rails Engine; happy to contribute back :+1:
This change affects how files are loaded in during the migration. Using
Rails.configuration.paths
instead of joining withRails.root
allows Rails Engines to patch in their own models to be included inside the migration.This enables something like the following:
Otherwise every model that an engine defines, would need to be extended by the application as a separate model to be found by the migrator.