jasonmk/datastax_rails — pull request #23 by davidkelley (2014-05-22 12:13:00+00:00)
Title: Use Rails configuration paths in migrator

This change affects how files are loaded in during the migration. Using `Rails.configuration.paths` instead of joining with `Rails.root` allows Rails Engines to patch in their own models to be included inside the migration.

This enables something like the following:
```
class Engine < ::Rails::Engine
initializer :append_models do |app|
paths.add(engine_models = "app/models/#{self.engine_name}")
config.paths[engine_models].expanded.each do |expanded_path|
app.config.paths['app/models'] << expanded_path
end
end
end
```

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.