Class: Synchronisable::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object


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

def self.next_migration_number(dirname)
  ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#create_initializer_fileObject


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

def create_initializer_file
  copy_file 'initializer.rb', 'config/initializers/synchronisable.rb'
end

#create_migration_fileObject


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

def create_migration_file
  migration_template 'create_imports_migration.rb', 'db/migrate/create_imports.rb'
end