Class: DetourGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_initializerObject



17
18
19
# File 'lib/generators/detour_generator.rb', line 17

def create_initializer
  copy_file "detour.rb", "config/initializers/detour.rb"
end

#create_migration_fileObject



12
13
14
# File 'lib/generators/detour_generator.rb', line 12

def create_migration_file
  migration_template "migration.rb", "db/migrate/setup_detour.rb"
end