In my views I’ve been always including the following section (not very DRY):
<% if @model.errors.any? %>
...
<% @model.errors.full_messages.each do |msg| %>
...
<% end %>
<% end %>
However, Rails also provides the flash[:error] functionality. Is it meant just for single failure messages like a controller exception? Or should I use flash[:error] for everything and copy over model errors into that hash?
Things like model errors can live in a partial; pass in the object in question as a local:
Personally, I feel the flash scope is for a different class of messages, but there’s nothing fundamentally “incorrect” about using it for validation errors as well.