When using the recommended solution for Rails Engines, this breaks the generator in the root application as the location of the generated migration ends up being in. I suspect the behaviour should be if the path is an array then it should use the first path in the list when generating a migration.
module EngineName
class Engine < ::Rails::Engine
initializer :engine_name do |app|
::DataMigrate.configure do |data_migrate|
default_path = ::DataMigrate::Config.new.data_migrations_path
data_migrate.data_migrations_path = [default_path, root.join('db', 'data')]
end
end
end
end
When using the recommended solution for Rails Engines, this breaks the generator in the root application as the location of the generated migration ends up being in. I suspect the behaviour should be if the path is an array then it should use the first path in the list when generating a migration.
/db/data/engine/db/data/engine2/db/data/1212412412_migration.rb