In your Post model, you can track a deleted message for deleted parts so that you can use it when you show message removal notifications. you can improve your notification “Message has been deleted”, for example, “Message with XYZ content deleted in abc time format”, for example, your Post.rb having the field: content, therefore in your Post.rb
class Post < ActiveRecord::Base include PublicActivity::Model tracked :params => { :content => proc {|controller, model| (model.content)} }
and in your public_activity / post / destroy.html.haml you can access the content p[:content] Or you can reject the activity record with: key => post.destroy to do this in your notification controller in the action pointer class NotificationsController <ApplicationController
def index @activities = PublicActivity::Activity.order("created_at DESC").reject{|activity| (activity.key == "post.destroy" }
this will not notify the details of deleting messages in notifications.
source share