Error messages without divs?

Is there a way to get the output of error_messages_on without the
wrapping divs, or do I have to make my own helper for this?


- Adam

** Expert Technical Project and Business Management
**** System Performance Analysis and Architecture
****** [ http://www.adamfields.com ]

[ http://www.aquick.org/blog ] … Blog
[ http://www.adamfields.com/resume.html ]… Experience
[ http://www.flickr.com/photos/fields ] … Photos
[ http://www.aquicki.com/wiki ]…Wiki

Adam F. wrote:

Is there a way to get the output of error_messages_on without the
wrapping divs, or do I have to make my own helper for this?

Looks like the div is not configurable:

File

vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb

def error_message_on(object, method, prepend_text = “”,
append_text = “”, css_class = “formError”)
if errors = instance_variable_get("@#{object}").errors.on(method)
content_tag(“div”,
“#{prepend_text}#{errors.is_a?(Array) ?
errors.first :
errors}#{append_text}”, :class =>
css_class)
end
end

You can configure the css class, though.

This should help:
http://wiki.rubyonrails.org/rails/pages/HowtoChangeValidationErrorDisplay

Cheers,
Jord