Class: BackupNexus::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_backup_filesObject



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

def create_backup_files
  generate "backup_nexus:backup"
end

#create_migrationObject



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

def create_migration
  migration_template "migration.rb", "db/migrate/create_backup_nexus_tables.rb"
end

#mount_engineObject



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

def mount_engine
  route 'mount BackupNexus::Engine => "/backup_nexus", as: "backup_nexus"'
end

#show_readmeObject



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

def show_readme
  say "BackupNexus installed at /backup_nexus. Run bin/rails db:migrate next.", :green
end