The Validation system on Mongoid is the same that ActiveRecord because
use ActiveModel::Validation system.
In the before_validation, the errors.add can't works because its
delete when validation arrive. You just need add your validation with
the key validate :
instead
before_validation :check_embedded
use
validate :check_embedded
--
Cyril Mougel
http://blog.shingara.fr
Vous souhaitez poser des questions sur Ruby ?
N'hésitez pas à aller sur http://questions.rubyfr.org/