Sha256: b45bea7cae040bad2a5eee70db4ac35c5ea266da179a351f3475db69022b9599

Contents?: true

Size: 684 Bytes

Versions: 1

Compression:

Stored size: 684 Bytes

Contents

require "rails/railtie"

module Multiverse
  class Railtie < Rails::Railtie
    generators do
      require "rails/generators/active_record/migration"
      ActiveRecord::Generators::Migration.prepend(Multiverse::Generators::Migration)

      require "rails/generators/active_record/model/model_generator"
      ActiveRecord::Generators::ModelGenerator.prepend(Multiverse::Generators::ModelGenerator)
    end

    rake_tasks do
      namespace :db do
        task :load_config do
          ActiveRecord::Tasks::DatabaseTasks.migrations_paths = [Multiverse.migrate_path]
          ActiveRecord::Tasks::DatabaseTasks.db_dir = [Multiverse.db_dir]
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multiverse-0.0.1 lib/multiverse/railtie.rb