ruby on rails - input from form being converted to decimal on insert -
i have db column upc codes setup 'numeric' data type in postgres.
i generated scaffolding input values table, rails converting input in float reason,
eg, 13 digit number entry 1234567890000 converted 1234567890000.0
from logs:
insert "upc_codes" ("upccode") values (1234567890000.0) returning "id"
where data type sql statement being set, or not set case may be?
what data type using column? try changing column type integer in migration:
change_column :upc_codes, :upc_code, :integer
Comments
Post a Comment