You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is "by design" (the behaviour you're describing is as it's documented and tested to work). It's purpose is mainly to render errors on :base out of the box:
# Renders errors on :base
<%= f.semantic_errors %>
In addition, you can optionally pass in other attributes you want to also render errors for. The use case was (if I recall correctly) that Attachment Fu or Paperclip had file upload errors on other attributes that weren't represented by form inputs.
# Renders errors on :base *and* on :something special
<%= f.semantic_errors :something_special %>
So, you're example above is, not surprisingly, rendering the errors on :base twice.
This causes me to wonder:
were you getting different results in Rails 3.0, or is this a fresh app?
what were you expecting semantic_errors to do differently?
The only code change I can think of is to drop :base from the list if it's been passed in as an arg like the example above, removing the duplication. I'll work on that, please get back to me on the rest @tanman726.
in the model and
in the view yields
The text was updated successfully, but these errors were encountered: