diff options
-rw-r--r-- | activerecord/lib/active_record/enum.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb index b70d52aa87..3086f13f96 100644 --- a/activerecord/lib/active_record/enum.rb +++ b/activerecord/lib/active_record/enum.rb @@ -98,7 +98,7 @@ module ActiveRecord end def type_cast_from_database(value) - mapping.key(value) + mapping.key(value.to_i) end def type_cast_for_database(value) |