Skip to content

Conversation

@jmondo
Copy link
Contributor

@jmondo jmondo commented Jun 15, 2015

Previously, quoting an array fell back to inspect, which is ok for
strings, but not good for BigDecimals, for instance.

Previously, quoting an array fell back to `inspect`, which is ok for
strings, but not good for BigDecimals, for instance.
@jmondo
Copy link
Contributor Author

jmondo commented Jun 15, 2015

in our project we have an order model with "individual portions" column that is an array of decimals in postgres. the default is an array with the BigDecimal 1.0 in it.

before:

#  individual_portions                        :decimal(, )      default([#<BigDecimal:7fd89b22c1a0,'0.1E1',9(18)>]), is an Array

after:

#  individual_portions                        :decimal(, )      default(["1.0"]), is an Array

ctran added a commit that referenced this pull request Jun 16, 2015
Quote each value in default arrays
@ctran ctran merged commit be6f088 into ctran:develop Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants