seed_dump icon indicating copy to clipboard operation
seed_dump copied to clipboard

Trouble with bigdecimal

Open clarkbremer opened this issue 9 years ago • 2 comments

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?

clarkbremer avatar Jul 03 '15 14:07 clarkbremer

Just realized the issue: Those BigDecimal objects are in a serialized array column.

clarkbremer avatar Jul 03 '15 21:07 clarkbremer

same problem here

kazkovsky avatar Nov 19 '15 15:11 kazkovsky