Sha256: 76ebefafdc239d0f8dc313d6d1662728d268adfb98905f6544d36334a4095be4

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

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

module Nifty
  module Attachments
    class MigrationGenerator < Rails::Generators::Base
      include Rails::Generators::Migration

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

      def self.next_migration_number(path)
        Time.now.utc.strftime("%Y%m%d%H%M%S")
      end

      def create_model_file
        migration_template 'migration.rb', "db/migrate/create_nifty_attachments_table.rb"
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/nifty-attachments-1.0.4/lib/nifty/attachments/migration_generator.rb
nifty-attachments-1.0.4 lib/nifty/attachments/migration_generator.rb