Sha256: 3c80360a168c423fb07afd0713a94a546d2c85e43bde97574b34e771c794b748

Contents?: true

Size: 487 Bytes

Versions: 8

Compression:

Stored size: 487 Bytes

Contents

module LogBook
  module Generators
    module Migration
      # Implement the required interface for Rails::Generators::Migration.
      def next_migration_number(dirname) #:nodoc:
        next_migration_number = current_migration_number(dirname) + 1
        if ::ActiveRecord::Base.timestamped_migrations
          [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
        else
          "%.3d" % next_migration_number
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails_log_book-2.4.0 lib/generators/log_book/migration.rb
rails_log_book-2.3.0 lib/generators/log_book/migration.rb
rails_log_book-2.2.0 lib/generators/log_book/migration.rb
rails_log_book-2.1.0 lib/generators/log_book/migration.rb
rails_log_book-1.0.0 lib/generators/log_book/migration.rb
rails_log_book-0.3.0 lib/generators/log_book/migration.rb
rails_log_book-0.2.0 lib/generators/log_book/migration.rb
rails_log_book-0.1.0 lib/generators/log_book/migration.rb