Jun 25, 2008

Validation of Rails

The validation function of Rails is very convenient.

When errors occur, textboxes are bounded by "div" tags.
Instead of "div", I want to use "span".

I write a code in config/environment.rb.
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
Complete!

No comments: