Skip to content

Quote each value in default arrays #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2015
Merged

Quote each value in default arrays #257

merged 1 commit into from
Jun 16, 2015

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