阅读背景:

在Rails上,form_for和validate_presence_of如何携手合作?

来源:互联网 

when we have validate_presence_of :name in the model and then when we put in the create action that we re-render 'new', then the form_for will populate the fields, and error_messages_for 'story' will have the correct error message.when we have validate_presence_of :name in the




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: