Class: Blazer::Generators::UploadsGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_migrationObject



9
10
11
# File 'lib/generators/blazer/uploads_generator.rb', line 9

def copy_migration
  migration_template "uploads.rb", "db/migrate/create_blazer_uploads.rb", migration_version: migration_version
end

#migration_versionObject



13
14
15
# File 'lib/generators/blazer/uploads_generator.rb', line 13

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