开发者

Rails error_messages helper

This is a very common piece of code

&开发者_如何学JAVAlt;% form_for :blah... do |f| %>
<%= f.error_messages %>
First name: <%= f.text_field :first_name %><br />
....
<% end %>

error_messages is a helper method but I am having a hard time finding the documentation for it, why is that?


I found them here: error_messages have same params as error_messages_for.

In Rails 3 however, error_messages and error_messages_for have been deprecated and have been moved out to a plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜