Class: PhrasingPlusGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/phrasing_plus/phrasing_plus_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_numberObject



10
11
12
# File 'lib/generators/phrasing_plus/phrasing_plus_generator.rb', line 10

def self.next_migration_number(*)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end

Instance Method Details

#create_migrationsObject



5
6
7
8
# File 'lib/generators/phrasing_plus/phrasing_plus_generator.rb', line 5

def create_migrations
  phrasing_image_migration = "db/migrate/create_phrasing_images.rb"
  migration_template phrasing_image_migration, phrasing_image_migration
end