开发者

Rails error_messages helper

开发者 https://www.devze.com 2023-01-02 23:55 出处:网络
This is a very common piece of code &开发者_如何学JAVAlt;% form_for :blah... do |f| %> <%= f.error_messages %>

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

精彩评论

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

关注公众号