module Sequel::Plugins::BeforeAfterSave

The before_after_save plugin reorders some internal Sequel operations so they happen before after_create, after_update, and after_save are called, instead of after. These operations are:

This behavior will become the default in Sequel 5.

Usage:

# Make all model subclasses perform the operations before after_save
Sequel::Model.plugin :before_after_save

# Make the Album class perform the operations before after_save
Album.plugin :before_after_save