Module: Humpyard::Generators::ModelTemplate::ClassMethods
- Defined in:
- lib/generators/humpyard.rb
Instance Method Summary collapse
-
#next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Instance Method Details
#next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
104 105 106 107 108 109 110 |
# File 'lib/generators/humpyard.rb', line 104 def next_migration_number(dirname) #:nodoc: if ::ActiveRecord::Base. Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end |