Skip to content
Browse files

Don't coerce to string if the value is nil

  • Loading branch information...
1 parent ea82393 commit d5d13b3a0ba7dd8ff0e8a9e22f562d568a247b87 @solnic solnic committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dm-core.rb
View
2 lib/dm-core.rb
@@ -15,7 +15,7 @@ module Undefined; end
class Virtus::Coercion::Object
def self.to_string(value)
- value.to_s
+ value.nil? ? value : value.to_s
end
end

0 comments on commit d5d13b3

Please sign in to comment.
Something went wrong with that request. Please try again.