seed_dump
seed_dump copied to clipboard
Trouble with bigdecimal
I love this plugin, but I have a problem when the model contains bigdecimal objects. I get stuff like this:
{test: "arm_curl", gender: "male", min_age: 65, max_age: 69, scores: [#<BigDecimal:7fc7c9662108,'0.27E2',9(18)>, #<BigDecimal:7fc7c9662090,'0.25E2',9(18)>]},
I'm using postgres, and the column types are t_integer and t_decimal.
When I run the seed file, it bombs with:
SyntaxError: /vagrant/db/seeds.rb:89: syntax error, unexpected ')', expecting '}'
Any ideas?
Just realized the issue: Those BigDecimal objects are in a serialized array column.
same problem here