Loading

rails undefined method error_messages

rails undefined method error_messages

学习了:http://stackoverflow.com/questions/10002140/use-error-messages-in-rails-3-2-raises-undefined-method-error

<%= form_for [@camp, @program] do |f| %>
   <% @program.errors.full_messages.each do |msg| %>
      <p><%= msg %></p>
   <% end %>
<%= f.label :name %>
<% end %>

 

posted @ 2017-04-24 22:58  stono  阅读(282)  评论(0编辑  收藏  举报