Integrated Yehuda's new callback code from rails

This commit is contained in:
Peter Gumeson 2009-06-07 02:57:22 -07:00
parent 1c6e073b47
commit dc4787e905
8 changed files with 228 additions and 221 deletions

View file

@ -77,7 +77,7 @@ module CouchRest
base.class_eval <<-EOS, __FILE__, __LINE__
define_callbacks :validate
if method_defined?(:_run_save_callbacks)
save_callback :before, :check_validations
set_callback :save, :before, :check_validations
end
EOS
base.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1