Class: Ponch::Generators::DeliveriesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Ponch::Generators::DeliveriesGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/ponch/deliveries_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
:nodoc:
18 19 20 21 22 23 24 |
# File 'lib/generators/ponch/deliveries_generator.rb', line 18 def self.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 |
Instance Method Details
#copy_files ⇒ Object
14 15 16 |
# File 'lib/generators/ponch/deliveries_generator.rb', line 14 def copy_files migration_template('create_deliveries.rb', 'db/migrate/create_ponch_deliveries.rb') end |