Class: ActiveRecord::Migrations::Generator

Inherits:
Generators::MigrationGenerator
  • Object
show all
Defined in:
lib/active_record/migrations/generator.rb

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject



30
31
32
33
34
# File 'lib/active_record/migrations/generator.rb', line 30

def create_migration_file
	set_local_assigns!
	validate_file_name!
	migration_template @migration_template, File.join(db_migrate_path, "#{file_name}.rb")
end

#db_migrate_pathObject



36
37
38
# File 'lib/active_record/migrations/generator.rb', line 36

def db_migrate_path
	::ActiveRecord::Migrations.migrations_root
end