Class: SimpleToggle::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



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

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

Instance Method Details

#copy_migrationsObject



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

def copy_migrations
  copy_migration "create_simple_toggles.rb"
end