Class: Feedy::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



11
12
13
# File 'lib/generators/feedy/install_generator.rb', line 11

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

Instance Method Details

#copy_migration_fileObject



15
16
17
# File 'lib/generators/feedy/install_generator.rb', line 15

def copy_migration_file
  migration_template "migration.rb", "db/migrate/create_feedbacks.rb"
end