Sha256: 28363c3b2ae254bbfb385cad8836b9162d2986e8189fa0facf1176a058cdca70

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 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"
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nifty-attachments-1.0.0 lib/nifty/attachments/migration_generator.rb