diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/type/boolean.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/type/boolean.rb b/activerecord/lib/active_record/type/boolean.rb index 2e24afc7c0..f6a75512fd 100644 --- a/activerecord/lib/active_record/type/boolean.rb +++ b/activerecord/lib/active_record/type/boolean.rb @@ -10,10 +10,8 @@ module ActiveRecord def cast_value(value) if value == '' nil - elsif ConnectionAdapters::Column::FALSE_VALUES.include?(value) - false else - true + !ConnectionAdapters::Column::FALSE_VALUES.include?(value) end end end |