Class: QboRails::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



26
27
28
# File 'lib/generators/qbo_rails/install/install_generator.rb', line 26

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

Instance Method Details

#active_recordObject



22
23
24
# File 'lib/generators/qbo_rails/install/install_generator.rb', line 22

def active_record
  migration_template 'db/migrate/create_qbo_errors.rb', 'db/migrate/create_qbo_errors.rb'
end

#copy_configObject



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

def copy_config
   template('config/qbo_rails.rb', "config/initializers/qbo_rails.rb")
end

#copy_modelObject



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

def copy_model
   template('models/qbo_error.rb', "app/models/qbo_error.rb")
end