Skip to content

Commit a52175b

Browse files
catmandosfcgeorge
authored andcommitted
1 parent 03ff575 commit a52175b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/reactive_record/active_record/instance_methods.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module ActiveRecord
33
module InstanceMethods
44

55
def inspect
6-
"<#{model_name}:#{ReactiveRecord::Operations::Base::FORMAT % backing_record.object_id} "\
6+
"<#{model_name}:#{ReactiveRecord::Operations::Base::FORMAT % to_key} "\
77
"(#{ReactiveRecord::Operations::Base::FORMAT % object_id}) "\
88
"#{backing_record.inspection_details} >"
99
end
@@ -173,6 +173,10 @@ def errors
173173
@backing_record.errors
174174
end
175175

176+
def to_key
177+
@backing_record.object_id
178+
end
179+
176180
def update_attribute(attr, value, &block)
177181
send("#{attr}=", value)
178182
save(validate: false, &block)

0 commit comments

Comments
 (0)