diff options
author | Yoshiyuki Kinjo <yskkin@gmail.com> | 2018-09-06 20:02:12 +0900 |
---|---|---|
committer | Yoshiyuki Kinjo <yskkin@gmail.com> | 2018-09-07 16:17:15 +0900 |
commit | ba406d9c220c211439820271aabcf83395c60957 (patch) | |
tree | ba6970b943bbe976d875a63464f836c65ac7fe56 /guides/source | |
parent | 54a9dbf5f19e128a2da851707fdaf34868b50078 (diff) | |
download | rails-ba406d9c220c211439820271aabcf83395c60957.tar.gz rails-ba406d9c220c211439820271aabcf83395c60957.tar.bz2 rails-ba406d9c220c211439820271aabcf83395c60957.zip |
Fix non_numeric_string?
For example, dirty checking was not right for the following case:
```
model.int_column = "+5"
model.float_column = "0.5E+1"
model.decimal_column = "0.5e-3"
```
It is enough to see whether leading character is a digit for avoiding
invalid numeric expression like 'wibble' to be type-casted to 0, as
this method's comment says.
Fixes #33801
Diffstat (limited to 'guides/source')
0 files changed, 0 insertions, 0 deletions