Class: Dynabute::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object

argument :stylesheets_type, :type => :string, :default => ‘less’, :banner => ‘*less or static’ class_option :‘no-coffeescript’, :type => :boolean, :default => false, :desc => ‘Skips coffeescript replacement into app generators’



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

def self.next_migration_number(path)
  next_migration_number = current_migration_number(path) + 1
  ActiveRecord::Migration.next_migration_number(next_migration_number)
end

Instance Method Details

#copy_migrationsObject



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

def copy_migrations
  migration_template 'migration.rb', "db/migrate/create_dynabutes.rb"
end