Class: AmpleAssets::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Generators::Utils

next_migration_number

Class Method Details

.source_rootObject



16
17
18
# File 'lib/generators/ample_assets/install_generator.rb', line 16

def self.source_root
  @source_root ||= File.join(File.dirname(__FILE__), 'templates')
end

Instance Method Details

#create_migration_fileObject



20
21
22
# File 'lib/generators/ample_assets/install_generator.rb', line 20

def create_migration_file
   migration_template 'migration.rb', 'db/migrate/create_ample_assets_tables.rb' rescue p $!.message
end