Class: Changeful::Generators::InstallGenerator

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

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



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

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

.source_rootObject



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

def self.source_root
  File.dirname(__FILE__) + '/templates'
end

Instance Method Details

#copy_changeful_migrationObject



9
10
11
12
# File 'lib/generators/changeful/install_generator.rb', line 9

def copy_changeful_migration
  migration_template 'migration.rb',
                     'db/migrate/create_changeful_contents.rb'
end