error_messages_for
来源:互联网 发布:螺纹编程 编辑:程序博客网 时间:2024/06/05 09:18
在http://www.ruby-forum.com/topic/114652#new论坛中看到如下问题:
I have a database table called "hvd_codes", the model is called HvdCode.
In my form partial, what should I enter as a parameter to
error_messages_for? I've tried <%= error_messages_for 'hvd_codes' %> but nothing is
displayed.
IRC error_messages_for simply looks for a global variable named after
its parameter and parse the result 'errors' called on it.
So if you have a @hvdcode which is a HvdCode instance, just use
'hvdcode'. If you had a @foo instance of HvdCode, you'd use 'foo'...
- error_messages_for
- 边学边做ROR( 错误信息error_messages_for was removed from Rails and is now available as a plugin)
- 视图的缩放的完整论述
- 得用DWR实时自动动态更新网页数据
- 打开文件
- A
- 悬停效果 静止不动 不随滚动条滚动 纯css实现
- error_messages_for
- System.Configuration.ConfigurationManager.GetSection
- zz一篇很赞同的文章:2008年以后房价会降?想都不要想
- sql 实现递归算法
- VC编译连接错误解决札记
- 设计模式示例一 Factory Method(工厂方法)
- VB图像处理,(七)一种邻近均值滤波器的算法介绍(去尘,去噪音)
- C++程序员常用工具集
- JavaScript中的null和undefined