我正在尝试使用带有参数的 Public_activity gem。
在我的控制台上:
c = PublicActivity::Activity.find(34)
PublicActivity::Activity Load (0.2ms) SELECT "events".* FROM "events" WHERE
"events"."id" = ? LIMIT 1 [["id", 34]]
=> #<PublicActivity::Activity id: 34, trackable_id: 17, trackable_type: "Follow", owner_id: 2, owner_type: "User", key: "follow.destroy", parameters: {:notif=>"on"}, recipient_id: nil, recipient_type: nil, created_at: "2014-08-15 04:44:03", updated_at: "2014-08-15 04:44:03">
如何在 PublicActivity::Activity.all 中搜索以找到带有 parameters[:notif] = "on" 的一条记录?
实际上我的问题要简单得多......我如何使用 Active Record Query 来查找带有哈希的特定记录!?