我正在使用经过审核的 gem 来跟踪记录的更改。审计对象看起来像
id: 1,
auditable_id: 1,
auditable_type: "Customer",
associated_id: nil,
associated_type: nil,
user_id: nil,
user_type: nil,
username: nil,
action: "create",
audited_changes:
{"first_name"=>"Milan McClure",
"last_name"=>"Wilfred Carter IV",
"email"=>"brian.hahn@vonrueden.com",
"sms_optin"=>true,
"title"=>nil,
"is_deleted"=>false,
"deleted_at"=>nil,
"restored_at"=>nil},
version: 1,
comment: nil,
remote_address: nil,
request_uuid: "6e462bf8-4788-4ec5-a6ee-f31a7a8226d0",
created_at: Wed, 12 Apr 2017 12:20:39 UTC +00:00>,
等等。现在我只想过滤掉那些审计,其中审计对象中的哈希 audit.audited_changes 包含名字的更改。我如何查询这个?