require 'active_support' require 'active_model/callbacks' module NinjaModel module Callbacks extend ActiveSupport::Concern included do extend ActiveModel::Callbacks define_model_callbacks :initialize, :find, :touch, :only => :after define_model_callbacks :save, :create, :update, :destroy, :validation end end end