Theocacao
Leopard
Design Element
Comment on "Speed Bumps with Validation in Rails"
by Mr eel — Oct 23
The error_messages_for() method is limited, in that it can only handle error mesages for one object and no you cannot customise the display. You can check out the API reference here.

Rather than wrestle with it, I've written my own helper method for displaying errors. It handles error messages for multiple objects. A bit limited now, but in the future I hope to expand it to let you customise it a bit more.

As for grouping similar errors together... I think this might be a bit tricky, but it's got me thinking now.
Back to "Speed Bumps with Validation in Rails"
Design Element

Copyright © Scott Stevenson 2004-2015