Skip to content

Commit

Permalink
Don't nullify false. (fixes #113) (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
forest authored Sep 7, 2017
1 parent bd4639a commit 2d4f731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/virtus/attribute/nullify_blank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def coerce(input)
if !value_coerced?(output) && input.blank?
nil
# Added to nullify anything that is blank not just strings.
elsif output.blank?
elsif output.blank? && output != false
nil
else
output
Expand Down

0 comments on commit 2d4f731

Please sign in to comment.