diff options
author | Kir Shatrov <shatrov@me.com> | 2017-06-20 23:26:13 -0400 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-06-20 23:29:37 -0400 |
commit | fa14332ad202dcc941a6dc3863d606e3f3f6e851 (patch) | |
tree | 086900f5ffeb34f89f8ad97bdb3231b7254060b4 /actionview/test/template | |
parent | ab0e4558816b1a69b4e96446ffe2812e21053b42 (diff) | |
download | rails-fa14332ad202dcc941a6dc3863d606e3f3f6e851.tar.gz rails-fa14332ad202dcc941a6dc3863d606e3f3f6e851.tar.bz2 rails-fa14332ad202dcc941a6dc3863d606e3f3f6e851.zip |
Avoid begin/rescue in fixture quoting
Scalar values like arrays and hashes can't be inserted
directly into table. Previously, the way to determine if
the value is scalar was to try quoting it. If `quote` raised
with an error than the value has to be converted to YAML.
This flow is not very obvious. Ideally we could have
a `quotable?` method in the connection, but I think
that we can avoid begin/rescue block by simply checking
if the value is Array or Hash.
https://github.com/rails/rails/commit/aa31d21f5f4fc4d679e74a60f9df9706da7de373
Diffstat (limited to 'actionview/test/template')
0 files changed, 0 insertions, 0 deletions