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:
parent
83b70ec080
commit
4682e4ac5d
5 changed files with 28 additions and 24 deletions
|
@ -12,8 +12,7 @@ module CouchRest #:nodoc:
|
|||
:create,
|
||||
:destroy,
|
||||
:save,
|
||||
:update,
|
||||
:validate
|
||||
:update
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ module CouchRest
|
|||
extend ActiveSupport::Concern
|
||||
included do
|
||||
include ActiveModel::Validations
|
||||
include ActiveModel::Validations::Callbacks
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue