我想在审核日志中添加自定义属性,例如first_name, last_name
使用审核的 gem。知道如何更新自定义属性的值吗?
#<AuditLog id: 1,
auditable_id: 2,
auditable_type: "User",
associated_id: nil,
associated_type: nil,
user_id: 2,
company_id: nil,
user_type: "User",
username: nil,
first_name: nil, last_name: nil, action: "update",
audited_changes: {"first_name"=>["Name1", "Name2"]}, version: 8,
comment: nil,
remote_address: "::1", request_uuid: "ed24f0d3-7ca7-42b1-b1a4-202222b38f7c", created_at: "2022-01-28 17:59:08">
enter code here
我的用户模型包含这两个属性
t.column :first_name, :string
t.column :last_name, :string