ruby on rails - How to retrieve error messages when using Mongoid's #valid? -
this short , simple question. i'm validating mongoid documents in memory (without persisting them) using mongoid's #valid? method.
i want retrieve error messages when validation unsuccessful. how can retrieve them?, because @target.errors.full_messages throwing empty array.
thanks,
closed question
the @target.errors.full_messages indeed contains error messages. me making mistake.
best,
Comments
Post a Comment