The problem is the decimal column. rake ignored the precision and scale
parameters and defined it as decimal(10,0). What’s the magic words to
actually get rake to create a decimal column with decimal places? I’m
sure it’s obvious, but I don’t see it.
The column type :decimal didn’t work in my installation, so I worked
around it with a plain MySQL statement in the migration script instead
of your t.column statement:
t.column :price, :float
execute “alter table products modify column price decimal(8,2)”
The problem is the decimal column. rake ignored the precision and scale
parameters and defined it as decimal(10,0). What’s the magic words to
actually get rake to create a decimal column with decimal places? I’m
sure it’s obvious, but I don’t see it.
The problem is the decimal column. rake ignored the precision and scale
parameters and defined it as decimal(10,0). What’s the magic words to
actually get rake to create a decimal column with decimal places? I’m
sure it’s obvious, but I don’t see it.
You need to be running edge rails. Decimal support isn’t included in
the stable release.
Isak
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.