Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #190 from yahonda/field_changed_rails4

rails4: Address 2 failures at nested_attributes_test.rb
  • Loading branch information...
commit affd18c6ef018353f1862c1ed319e236d2a0a95d 2 parents 02b2c93 + e354c82
Yasuo Honda yahonda authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/active_record/connection_adapters/oracle_enhanced_dirty.rb
2  lib/active_record/connection_adapters/oracle_enhanced_dirty.rb
View
@@ -18,6 +18,8 @@ def _field_changed?(attr, old, value)
# therefore need to convert empty string value to nil if old value is nil
elsif column.type == :string && column.null && old.nil?
value = nil if value == ''
+ elsif old == 0 && value.present? && value != '0'
+ value = nil
else
value = column.type_cast(value)
end
Please sign in to comment.
Something went wrong with that request. Please try again.