Class: WizardOfAwes::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Extended by:
ActiveRecord::Generators::Migration
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/wizard_of_awes/install/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



14
15
16
# File 'lib/generators/wizard_of_awes/install/install_generator.rb', line 14

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

Instance Method Details

#copy_initializerObject



18
19
20
# File 'lib/generators/wizard_of_awes/install/install_generator.rb', line 18

def copy_initializer
  template 'wizard_of_awes.rb.erb', 'config/initializers/wizard_of_awes.rb'
end

#create_migration_fileObject



22
23
24
# File 'lib/generators/wizard_of_awes/install/install_generator.rb', line 22

def create_migration_file
  migration_template 'create_helper_snippets.rb', 'db/migrate/create_helper_snippets.rb'      
end