Skip to content

Commit ef91f42

Browse files
committed
remove call to attributes. may prevent a loop while logging
1 parent 7f6bd87 commit ef91f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/phi_attrs/phi_record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def wrap_phi
553553
# @return [Array<String>] log key for an instance of this class
554554
#
555555
def phi_log_keys
556-
@__phi_log_id = persisted? ? "Key: #{attributes[self.class.primary_key]}" : "Object: #{object_id}"
556+
@__phi_log_id = persisted? ? "Key: #{public_send(self.class.primary_key)}" : "Object: #{object_id}"
557557
@__phi_log_keys = [PHI_ACCESS_LOG_TAG, self.class.name, @__phi_log_id]
558558
end
559559

0 commit comments

Comments
 (0)