Tuesday, June 19, 2012

Validating non-persistent models in Rails 3

Some times it happens that we need to validate entity that is short lived and not persisted anywhere. It is very easy to do in Rails 3 - just include
include ActiveModel::Validations
in your model and that's it - you can call
now to test it's correctness.

No comments:

Post a Comment