Class: Neighbor::Generators::CubeGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_migrationObject



10
11
12
# File 'lib/generators/neighbor/cube_generator.rb', line 10

def copy_migration
  migration_template "cube.rb", "db/migrate/install_neighbor_cube.rb", migration_version: migration_version
end

#migration_versionObject



14
15
16
# File 'lib/generators/neighbor/cube_generator.rb', line 14

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