Sha256: 8e94b620d0c8a069dd1403cfb4dc31645f2ec76e79f8386ba61a731fd8cc6f23
Contents?: true
Size: 464 Bytes
Versions: 4
Compression:
Stored size: 464 Bytes
Contents
module Toy module Callbacks extend ActiveSupport::Concern included do extend ActiveModel::Callbacks define_model_callbacks :save, :create, :update, :destroy end def save(*) run_callbacks(:save) { super } end def destroy run_callbacks(:destroy) { super } end private def create run_callbacks(:create) { super } end def update run_callbacks(:update) { super } end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
toystore-0.13.1 | lib/toy/callbacks.rb |
toystore-0.13.0 | lib/toy/callbacks.rb |
toystore-0.12.0 | lib/toy/callbacks.rb |
toystore-0.11.0 | lib/toy/callbacks.rb |