Question

Hi all I have users and messages, messages can be deleted by both receiver and sender, without affecting the each-other view.

so when the sender deletes the message the receiver still sees it, hope I'm clear.

I wouldd just add two attributes, sender_archived_at and receiver_archived_at, but I rather manage it with rails_acts_as_paranoid, is it possible and how?

Thanks in advance

Was it helpful?

Solution

I had a better look at the plugin, and I'm confident that there is no way (yet) for doing that with acts_as_paranoid

OTHER TIPS

"rails3_acts_as_paranoid" => hides records instead of deleting them, being able to recover them. With the help of this gem can able to soft delete a record of many to many relationship also.

  • e.g. Product , Category a famous many to many relation consider which has habtm's rich association like :through ,then at Product model level can define 'acts_as_paranoid' and also at join_table's model 'ProductCategory' model.But remeber like :dependent => :destroy is mentioned.

  • then suppose any product got soft deleted because of dependent :destory 'ProductCategory' join_table 'deleted_at' also sets, and can handle both way.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top