Class: RailsServerMonitor::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_migrationObject



11
12
13
# File 'lib/generators/rails_server_monitor/install_generator.rb', line 11

def copy_migration
  migration_template "install.rb", "db/migrate/rails_server_monitor_install.rb", migration_version: migration_version
end

#migration_versionObject



15
16
17
# File 'lib/generators/rails_server_monitor/install_generator.rb', line 15

def migration_version
  "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
end