Skip to content

Commit 6cb59f2

Browse files
committed
Ensure correct dirty tracking when boolean attribute is false
1 parent 014d464 commit 6cb59f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/attr_json/record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def attr_json_sync_to_rails_attributes
6565
attr_name = attribute_def.name
6666
value = container_value[attribute_def.store_key]
6767

68-
if value
68+
unless value.nil?
6969
# TODO, can we just make this use the setter?
7070
write_attribute(attr_name, value)
7171

0 commit comments

Comments
 (0)