Use :validation callbacks, not the :validate callbacks reserved by ActiveModel, ensuring callbacks are actually run when they're supposed to be.

This commit is contained in:
Greg Sterndale 2011-02-01 14:32:38 -05:00
parent 83b70ec080
commit 4682e4ac5d
5 changed files with 28 additions and 24 deletions

View file

@ -12,8 +12,7 @@ module CouchRest #:nodoc:
:create,
:destroy,
:save,
:update,
:validate
:update
end

View file

@ -15,6 +15,7 @@ module CouchRest
extend ActiveSupport::Concern
included do
include ActiveModel::Validations
include ActiveModel::Validations::Callbacks
end