Class: DataMigrater::CreateGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DataMigrater::CreateGenerator
- Defined in:
- lib/generators/data_migrater/create_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_migrate_file ⇒ Object
11 12 13 14 15 16 |
# File 'lib/generators/data_migrater/create_generator.rb', line 11 def create_migrate_file tmpl = 'db/data_migrate/data_migrate.rb.erb' version = Time.zone.now.strftime '%Y%m%d%H%M%S' template tmpl, "db/data_migrate/#{version}_#{name.underscore}.rb" end |