Sha256: d0d4b489d2ab0211dec2d55734605d3b4267768c5e0c6c379ec3c9deaf38d1c7

Contents?: true

Size: 567 Bytes

Versions: 16

Compression:

Stored size: 567 Bytes

Contents

module AttachmentMagick
  module Generators
    class MigrationGenerator < Rails::Generators::Base
      include Rails::Generators::Migration

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

      def self.next_migration_number(dirname)
        ActiveRecord::Base.timestamped_migrations ? Time.now.utc.strftime("%Y%m%d%H%M%S") : "%.3d" % (current_migration_number(dirname) + 1)
      end

      def create_migration_file
        migration_template "attachment_magick_migration.rb", "db/migrate/attachment_magick_migration.rb"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
attachment_magick-0.3.6 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.3.5 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.3.4 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.3.3 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.3.2 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.3.1 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.3 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.7 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.6 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.5 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.4 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.3 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.2 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.1 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.2.0 lib/generators/attachment_magick/migration_generator.rb
attachment_magick-0.1.0 lib/generators/attachment_magick/migration_generator.rb