folke
1
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 ]
[ Adam Fields (weblog) - - entertaining hundreds of millions of eyeball atoms every day ] … Blog
[ Adam Fields Resume ]… Experience
[ Adam Fields | Flickr ] … Photos
[ http://www.aquicki.com/wiki ]…Wiki
folke
2
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.
folke
3