`
fuyangchang
  • 浏览: 146075 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

error_messages_for

阅读更多
 在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'...


分享到:
评论

相关推荐

    message_block:替代error_messages_for,功能更强大,更灵活

    该视图助手通过从模型中获取错误消息并将其与Flash消息(错误,确认等多种类型)组合并输出到视图中,从而替代了error_messages_for。 该gem附带示例样式表和图像。 安装:Rails 3.1+ Asset Pipeline(message_...

    ErrorLog allows web developers quick and easy access to clearly formatted entries from the apache error_log file

    It by provides formatted HTML display of the log messages, merges multi-line entries while preserving whitespace formating, adds some highlighting for common elements (such as file paths, quoted ...

    Business Components for Java Error Messages

    Business Components for Java Error Messages OAF开发中错误查阅文档。

    Sun Cluster 3.1 Error Messages Guide.pdf

    The Sun™ Cluster 3.1 Error Messages Guide contains a list of error messages that might be seen on the console or in syslog(3) files while running Sun Cluster software. For most error messages, there ...

    手机游戏开发实例(smartphone联机炸弹人)

    c++ wince sdk AI &lt;br&gt;smartphone版本 和windows版本 &lt;br&gt;目录 Table of content I. Introduction....................................................................................................

    Framework not found IOSurface for architecture arm64(不能设为免费?)

    Framework not found IOSurface for architecture arm64所需 IOSurface.framework、FileProvider.framework

    8-07-14_MegaCLI for linux_windows

    SCGCQ00471745 (DFCT) - Same NVRAM log event IDs with different messages SCGCQ00475159 (DFCT) - While printing the ldinfo, there are some tabs instead of spaces for indentation so replaced all tabs ...

    Clustering by Passing Messages Between Data Points

    Clustering data by identifying a subset of representative examples is important for processing sensory signals and detecting patterns in data. Such “exemplars” can be found by randomly choosing an ...

    git 2.7.3 for windows 64bit

    When trying to modify a repository config outside of any Git worktree, git config no longer creates a .git/ directory but prints an appropriate error message instead. A new version of Git for Windows'...

    Microsoft Codeview and Utilities User's Guide

    Microsoft Codeview and ...C.2.2 LINK Nonfatal Error Messages C.2.3 LINK Warning Messages C.3 ILINK Error Messages C.3.1 ILINK Fatal Errors C.3.2 Incremental Violations C.3.3 ILINK Warning Messages C....

    informal:一个轻量级的可扩展 Javascript 表单验证库

    非正式的 一个轻量级的可扩展 Javascript 表单验证库 快速开始 在您的页面中包含 moment.js 和in... Selector for the element that contains error messages. .. attribute:: error_class Class to add to the `

    git 2.7.3 for windows 32bit

    When trying to modify a repository config outside of any Git worktree, git config no longer creates a .git/ directory but prints an appropriate error message instead. A new version of Git for Windows'...

    php.ini-development

    error_reporting ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT ; html_errors ; Default Value: On ; ...

    Debugging Malloc Lab: Detecting Memory-Related Errors

    You may find that this global list can also allow you to be more specific in your error messages, as it is otherwise difficult to determine the difference between an overwrite of a non-payload area ...

    BURNINTEST--硬件检测工具

    - Minor changes to the No operation error watchdog timer for the CD and Hard disk tests. - Minor correction to the Butterfly seek test. - Video playback trace logging increased. Release 5.3 build ...

    JLink_Windows_V648.zip

    DLL: When using J-Trace PRO with IAR EWARM a "failed to allocate x bytes of memory" error could occur. Fixed. DLL: Windows: Renesas RX: When using FINE interface and disabling ongoining debug mode on ...

    ActiveXperts SMS and Pager Toolkit3.2_crack

    The toolkit also supports SMSC dial-in service providers (for sending SMS messages only). Click here to see a list of SMS/Paging service providers around the world. You just need a standard Hayes ...

    Using Perl For Web Programming.pdf

    System Error Messages H G Flow Control Logical Operators H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (1 of 24) [2/17/2007 1:22:33 PM] Conditional Expressions H Compound Statements ...

    sent通信16年标准

    最新SAE sent协议;...12. Added E.3 Error Messages and Signals 13. Added A.7 Position Sensors and Combined Position Temperature Sensors 14. Added Overview of SENT standard structure (3.2)

    Django forms表单 select下拉框的传值实例

    今儿继续做项目,学习了Django的forms生成前端的代码。 forms.py class SignupForm(forms.Form): username = forms.CharField... error_messages={'required': '用户名不能为空', 'max_length': '用户名至少5位'

Global site tag (gtag.js) - Google Analytics