Class: Caber::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_initializer_fileObject



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

def create_initializer_file
  copy_file "initializers/caber.rb", "config/initializers/caber.rb"
end

#create_migration_fileObject



16
17
18
19
20
# File 'lib/generators/caber/install_generator.rb', line 16

def create_migration_file
  return if options[:skip_migrations]

  migration_template "migrations/01_create_caber_relations.rb.erb", File.join("db/migrate/create_caber_relations.rb")
end