ActiveRecord

ActiveRecord: Validation of Associations

If you have two models associated in some way, it is usual to add a validates_presence_of validator to ensure that the models are connected before saving. However, be aware that there are two ways of doing this with different performance ramifications.

0 Comments
Read more