diff options
author | TheMonster <alwahsh.ahmed@gmail.com> | 2014-02-26 03:24:44 +0200 |
---|---|---|
committer | TheMonster <alwahsh.ahmed@gmail.com> | 2014-02-27 23:54:49 +0200 |
commit | 6e53d92498ada27cea6c7bae85708fcf5579223c (patch) | |
tree | d2f95b5c979111c68c738a102d0ff610a4f7ea32 /ci | |
parent | 14e697cf2a1f2a4d223463839f6748fca4658bcf (diff) | |
download | rails-6e53d92498ada27cea6c7bae85708fcf5579223c.tar.gz rails-6e53d92498ada27cea6c7bae85708fcf5579223c.tar.bz2 rails-6e53d92498ada27cea6c7bae85708fcf5579223c.zip |
Fix a bug affecting validations of enum attributes
This fixes a bug where any enum attribute of a model
would be evaluated always as 0 when calling the
database on validations.
This fix converts the value of the enum attribute
to its integer value rather than the string before
building the relation as the bug occured when the
string finally gets converted to integer using
string.to_i which converts it to 0.
[Vilius Luneckas, Ahmed AbouElhamayed]
Diffstat (limited to 'ci')
0 files changed, 0 insertions, 0 deletions