Sha256: 52502fd59b3b7107fb5bdff062f613f16e98b3e0b040ef15bf3a8f72ef950206

Contents?: true

Size: 585 Bytes

Versions: 2

Compression:

Stored size: 585 Bytes

Contents

require 'rails/generators'
require "rails/generators/active_record"

module Carter
  module Generators
    class MigrationGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
 
      desc "Generates a migration for cart and cart_item models"
     
      source_root File.expand_path("../templates", __FILE__)

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

      def copy_migration
        migration_template "migration.rb",  "db/migrate/create_carter.rb"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
carter-0.8.1 lib/generators/carter/migration_generator.rb
carter-0.8.0 lib/generators/carter/migration_generator.rb