Sha256: 52dbdc0a24c4aa0debdd12179bc063c90521a0acf7da5924931f3c369a30b9b1

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

require 'rails/generators'
require 'rails/generators/rails/migration/migration_generator'
require 'rails/generators/active_record'
require 'rails/generators/active_record/migration/migration_generator'

module SecondBase
  class MigrationGenerator < ActiveRecord::Generators::MigrationGenerator

    source_root ActiveRecord::Generators::MigrationGenerator.source_root

    def self.desc
      Rails::Generators::MigrationGenerator.desc
    end

    include(Module.new{

      def migration_template(*args)
        args[1].sub! 'db/migrate', "#{Railtie.config_path}/migrate" if args[1]
        super(*args)
      end

    })

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
secondbase-1.0.0 lib/rails/second_base/generators/migration_generator.rb