Sha256: 28b1a06bf3833f98eb33ff368efd6e79e41d3b063935f745ceec539043882517

Contents?: true

Size: 610 Bytes

Versions: 8

Compression:

Stored size: 610 Bytes

Contents

module Plutus
  class BaseGenerator < Rails::Generators::Base
    include Rails::Generators::Migration

    def self.source_root
      @source_root ||= File.join(File.dirname(__FILE__), 'templates')
    end

    # Implement the required interface for Rails::Generators::Migration.
    # See http://apidock.com/rails/ActiveRecord/Generators/Base/next_migration_number/class
    def self.next_migration_number(dirname)
      if ActiveRecord::Base.timestamped_migrations
        Time.now.utc.strftime("%Y%m%d%H%M%S")
      else
        "%.3d" % (current_migration_number(dirname) + 1)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
plutus-0.17 lib/generators/plutus/base_generator.rb
plutus-0.16 lib/generators/plutus/base_generator.rb
plutus-0.15 lib/generators/plutus/base_generator.rb
plutus-0.14 lib/generators/plutus/base_generator.rb
tyche-0.14 lib/generators/plutus/base_generator.rb
odania_plutus-0.13 lib/generators/plutus/base_generator.rb
plutus-0.13 lib/generators/plutus/base_generator.rb
plutus-0.12.2 lib/generators/plutus/base_generator.rb