Danimal | 16 May 22:13

Re: ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models


Andy,

This looks awesome! Thanks for putting it together. I really like the
idea of keeping deleted items in separate tables so all the rest of
the AR stuff works as expected. Nice!

One thing I thought of while reading your README:

If you define your "Deleted" tables in a migration, why not build it
so that any future migrations would automatically adjust the deleted
tables? This may be more code on your end as you'd probably have to
either monkeypatch or just hook into the migration process, but it
couldn't be too hard. Pseudocode wise it would probably look like:

in "self.up", if a modification to table X occurs, check if there is
an X::Deleted table. If so, make the same modifications to X::Deleted

The beauty of doing this would be that you define your "deletable"
tables at the beginning, then just forget about 'em... So future
migrations are just normal migrations.

Just a thought, anyway. I'll be adding your plugin to some projects
I'm working on... and ditching my "acts_as_paranoid"-like hacks.

Thanks!

-Danimal

On May 15, 5:11 pm, Shngn <hartfo...@...> wrote:
> Acts_as_soft_deletable is a rails plugin that provides the ability to
> soft delete or disable models.
>
> When models are destroyed, they will be archived so that they can
> later be restored easily. Its similar to acts_as_paranoid but uses a
> different approach that should make it a little more foolproof.
>
> See the README at the following url for a better description.
>
> github url:http://github.com/ajh/acts_as_soft_deletable/tree/master
>
> Feedback is always appreciated.
>
> Thanks,
>
> Andy Hartford
> Substantial
> hartfo...@...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane