Ruby on Rails Saturday, May 29, 2010

Hi Greg,

Rails by default use DB column name while displaying errors on UI.  You can choose one of the following options to write custom validation errors

  1. User  plugin  http://rubyforge.org/projects/custom-err-msg/
  2. Check validation errors in validate method and use add_to_base for custom messages
  3. Override error_messages_for  method
--Haribhau

On Sat, May 29, 2010 at 3:46 PM, Greg Ma <lists@ruby-forum.com> wrote:
Hi,
When an error is display, it first show the column concerned. Does
someone knows how to change the display column name?

Greg
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment