Class: Pliny::Commands::Generator::Migration
- Defined in:
- lib/pliny/commands/generator/migration.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#display, #field_name, #initialize, #plural_class_name, #pluralized_file_name, #render_template, #singular_class_name, #table_name, #write_file, #write_template
Constructor Details
This class inherits a constructor from Pliny::Commands::Generator::Base
Instance Method Details
#create ⇒ Object
6 7 8 9 10 |
# File 'lib/pliny/commands/generator/migration.rb', line 6 def create migration = "./db/migrate/#{Time.now.to_i}_#{name}.rb" write_template('migration.erb', migration) display "created migration #{migration}" end |