johno / johno/archivable

Add an after_archive callback

Open
#10 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Ruby
Stars
9
Forks
7
PR merge metrics
No merged PRs in 30d

Description

This would ideally function similar to `dependent: :destroy`, allowing
a user to do the following:

``` rb
class Parent < AR::Base
after_archive :do_stuff

private

def do_stuff
children.find_each(&:archive!)
end
end
```

This will require tapping in to the `define_callback` API that ActiveRecord has.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.