I’m developing with ruby 1.9.2 and rails 3.2.2. Currently I want to
customize the error message html, to place the error message below a
text area. But what it behaves is two message box around the text area.
Do you know where the problem is? Thanks.
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
errors = instance.error_message
errors_list = “
- ” + errors.map { |e| “
- #{e} ” }.join +
“
%(#{html_tag}
Errors
#{errors_list}).html_safeend Content
Errors
- can't be blank
Errors
- can't be blank
Best regards,
Zhi-Qiang L.
[email protected]