simplified the validation callback method.

This commit is contained in:
Matt Aimonetti 2009-02-03 18:23:30 -08:00
parent fec21c3ff3
commit 5d9e9fc53f

View file

@ -46,7 +46,7 @@ module CouchRest
def self.included(base)
base.extend(ClassMethods)
base.class_eval <<-EOS, __FILE__, __LINE__
if (method_defined?(:save) && method_defined?(:_run_save_callbacks))
if method_defined?(:_run_save_callbacks)
save_callback :before, :check_validations
end
EOS