Sha256: c12ef391631652b358e8d07ed6104ae179908afc8833b1c889380ef66efe4704

Contents?: true

Size: 642 Bytes

Versions: 6

Compression:

Stored size: 642 Bytes

Contents

require 'rails/generators'
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
      require 'rails/generators/rails/migration/migration_generator'
      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

6 entries across 6 versions & 1 rubygems

Version Path
secondbase-2.1.4 lib/rails/second_base/generators/migration_generator.rb
secondbase-2.1.3 lib/rails/second_base/generators/migration_generator.rb
secondbase-2.1.2 lib/rails/second_base/generators/migration_generator.rb
secondbase-2.1.0 lib/rails/second_base/generators/migration_generator.rb
secondbase-2.0.0 lib/rails/second_base/generators/migration_generator.rb
secondbase-1.0.1 lib/rails/second_base/generators/migration_generator.rb