module ActiveModel::Callbacks

def _define_before_model_callback(klass, callback)

def _define_before_model_callback(klass, callback)
  klass.define_singleton_method("before_#{callback}") do |*args, &block|
    set_callback(:"#{callback}", :before, *args, &block)
  end
end