Soft Deletes - Let's try this again...

0 views
Skip to first unread message

Mike Gehard

unread,
Nov 23, 2009, 10:48:56 AM11/23/09
to Ruby on Rails: Talk
Hello all,

It seems that my first posting got into some sort of limbo so
apologies for the repost...


I am wondering how people here are handling soft deletes in Rails.
I've need a couple of gems/plugins that seem to handle this but from
what I gather development has stopped on them.

All I need to do right now is mark something as deleted in the
DB...nothing fancy.

I'm thinking that the simple addition of a deleted_at column, some
named scopes (maybe even a default scope) and a handler on delete to
set the deleted_at column and prevent the actual DB delete will do
the
trick. Any gotchas that I need to watch out for?

Thanks in advance.
Mike

eugenio

unread,
Nov 23, 2009, 11:02:05 AM11/23/09
to Ruby on Rails: Talk
i simply use the destroy action and a date column for that.
Reply all
Reply to author
Forward
0 new messages