Sha256: 505f51ec0c41e95c359b4551190b295884f51987005f5e80167fa79ac1c7b78e

Contents?: true

Size: 690 Bytes

Versions: 7

Compression:

Stored size: 690 Bytes

Contents

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

module Supercharged
  module Generators
    class MigrationsGenerator < Rails::Generators::Base
      include Rails::Generators::Migration

      source_root File.expand_path("../templates", __FILE__)

      desc "Generates migration for Supercharged"

      def self.next_migration_number(dirname)
        ActiveRecord::Generators::Base.next_migration_number(dirname)
      end

      def copy_migration
        migration_template 'install_migration.rb', 'db/migrate/install_supercharged.rb'
      end

      def mount_engine
        route "supercharged"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
supercharged-2.2.0 lib/generators/supercharged/migrations_generator.rb
supercharged-2.1.0 lib/generators/supercharged/migrations_generator.rb
supercharged-2.0.4 lib/generators/supercharged/migrations_generator.rb
supercharged-2.0.3 lib/generators/supercharged/migrations_generator.rb
supercharged-2.0.2 lib/generators/supercharged/migrations_generator.rb
supercharged-2.0.1 lib/generators/supercharged/migrations_generator.rb
supercharged-2.0.0 lib/generators/supercharged/migrations_generator.rb