I think this is what the OP was looking for / may have figured out, but didn't post in a solution.
Quick example scenario:
A user creates a comment, therefore a Public Activity Record (key: comment.create) is created for that comment.
Now, lets say the user deletes his comment.
There is still an activity (key: comment.create) stored in the activities table that relates to the original comment that just got deleted.
To delete that original activity all together when a user deletes their corresponding activity (key: comment.create). Simply do the following.
#comments_controller.rb or whatever class you are tracking
def destroy
@comment = current_user.comments.find(params[:id])
@activity = PublicActivity::Activity.find_by(trackable_id: (params[:id]), trackable_type: controller_path.classify)
@activity.destroy
@comment.destroy
end
Hope this helps someone.