We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03ff575 commit a52175bCopy full SHA for a52175b
lib/reactive_record/active_record/instance_methods.rb
@@ -3,7 +3,7 @@ module ActiveRecord
3
module InstanceMethods
4
5
def inspect
6
- "<#{model_name}:#{ReactiveRecord::Operations::Base::FORMAT % backing_record.object_id} "\
+ "<#{model_name}:#{ReactiveRecord::Operations::Base::FORMAT % to_key} "\
7
"(#{ReactiveRecord::Operations::Base::FORMAT % object_id}) "\
8
"#{backing_record.inspection_details} >"
9
end
@@ -173,6 +173,10 @@ def errors
173
@backing_record.errors
174
175
176
+ def to_key
177
+ @backing_record.object_id
178
+ end
179
+
180
def update_attribute(attr, value, &block)
181
send("#{attr}=", value)
182
save(validate: false, &block)
0 commit comments