rails/rails — pull request #14203 by Alwahsh (2014-02-26 01:34:08+00:00)
Title: 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 overrides the read_attribute_for_validation
method for enum attributes to make it return the
integer representing the value rather than the
value itself.
Fixes #14172