The only way I can get my Simple form to display an error is via
<% errors = f.object.errors.messages.collect { |k,v| "#{k}: #{v}" if v.length > 0 }.join("\n")%>
<%= f.error_notification message: "Errors: #{errors}" %>
Which seems way too complicated.
Scenario:
User table and nested, polymorphic table of social_profile links (facebook, twitter, etc).
If the user does not fill out any of the nested form when creating a new account, the profile inputs/params are empty strings and it saves fine.
However, if the user deletes all the profile links' input fields then the association to the social_profile table will not be created. Thus, if the user later tries to edit his account the nested social_profile form will not be displayed.
Adding validates :social_profile, presence: true, associated: true to the User's model prevents this error from happening, but there is no indication of what occurred given to the user. The best I could come up with is the original code, but it seems like there should be a better way.