Class: ActiveRecord::Generators::MigrationGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/mysql-decimal.rb

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject



4
5
6
7
8
9
10
11
# File 'lib/mysql-decimal.rb', line 4

def create_migration_file
  attributes.each do |x|
    if x.type == :decimal
      x.type = "decimal, :precision => 10, :scale => 2"
    end
  end 
	super
end