Module | Sequel::Plugins::ColumnsUpdated |
In: |
lib/sequel/plugins/columns_updated.rb
|
The columns_updated plugin stores the columns hash used in the UPDATE query when saving the instance, and makes it available in the after_update and after_save hooks via the columns_updated accessor. The data is cleared before returning from save.
Usage:
# Make all model subclasses store the columns hash used for updating Sequel::Model.plugin :columns_updated # Make the Album class store the columns hash used for updating Album.plugin :columns_updated