Forum: Ruby on Rails @user.orders<<new_order and validation

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C91098dc76d7ad473165ef24fe805312?d=identicon&s=25 Nanyang Zhan (xain)
on 2006-12-22 10:00
new_order =
@user.orders << new_order

There are validations for Order model.

How can I judge whether new_order is successfully added into
and if adding fails, how can I read the validation error messages?
This topic is locked and can not be replied to.