28 lines
425 B
Ruby
28 lines
425 B
Ruby
|
# encoding: utf-8
|
||
|
|
||
|
module CouchRest #:nodoc:
|
||
|
module Model #:nodoc:
|
||
|
|
||
|
module Callbacks
|
||
|
extend ActiveSupport::Concern
|
||
|
included do
|
||
|
extend ActiveModel::Callbacks
|
||
|
|
||
|
define_model_callbacks \
|
||
|
:create,
|
||
|
:destroy,
|
||
|
:save,
|
||
|
:update,
|
||
|
:validate
|
||
|
|
||
|
end
|
||
|
|
||
|
def valid?(*) #nodoc
|
||
|
_run_validation_callbacks { super }
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
end
|
||
|
end
|