Class: HearsayGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HearsayGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/hearsay_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
6 7 8 |
# File 'lib/generators/hearsay_generator.rb', line 6 def self.next_migration_number(dirname) Time.now.utc.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#create_migration_file ⇒ Object
10 11 12 |
# File 'lib/generators/hearsay_generator.rb', line 10 def create_migration_file migration_template 'hearsay_create_references.rb', 'db/migrate/hearsay_create_references.rb' unless Reference.table_exists? end |