ordered_error_messages_for

This plugin patches ActiveRecord::Errors and ActionView::Base so that the output of error_messages_for() can be ordered. In the core, it is not ordered, and the display sequence is determined through iteration of hash keys.

Example Usage

# The normal usage of error_messages_for still works...
error_messages_for(:user)

# ...but you can order it to
error_messages_for(:user, :order=>[:name,:password,:phone_number])
error_messages_for(:user, :order=>{:user=>[:name,:password,:phone_number]})

Installation

./script/plugin install http://orderederrors.rubyforge.org/svn/ordered_error_messages_for

Notice

This was my first plugin attempt and I may have violated good convention. If I have, let me know.

— John B Nelson, ChasingSparks