A little logic is necessary to prefill some types of fields after a form has been submitted and returned for error corrections.
在表单被提交并被返回以便修正错误后必需一个小逻辑来预先填充某些类型的域。
There are actually two types of validation error messages - those generated before the HTML form fields are bound to a class and those generated after the form fields are bound to the class.
实际上有两种错误消息类型:在捆绑html表单的时候根据类型生成的,和提交后表单元素绑定的类生成的。
If you follow the Rails conventions, an amazing amount of stuff, from routing requests to the correct controller and view, to validating form data and displaying error messages, just works.
如果你依照Rails的惯例,将会有令人惊艳的成果,从路由request对应到正确的controller和view,到验证表单资料和显示错误讯息,都可以直接运作。
应用推荐