From e8502edae76e2b1a4fd0c7865579ec41e6f38415 Mon Sep 17 00:00:00 2001 From: Aditya Sanghi Date: Tue, 20 Nov 2012 19:08:51 +0530 Subject: fix guide with field_with_error proc example --- guides/source/active_record_validations_callbacks.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'guides/source/active_record_validations_callbacks.md') diff --git a/guides/source/active_record_validations_callbacks.md b/guides/source/active_record_validations_callbacks.md index 5c27ccbf9e..0f4140b650 100644 --- a/guides/source/active_record_validations_callbacks.md +++ b/guides/source/active_record_validations_callbacks.md @@ -953,8 +953,12 @@ Below is a simple example where we change the Rails behavior to always display t ```ruby ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| - errors = Array(instance.error_message).join(',') - %(#{html_tag} #{errors}).html_safe + if html_tag =~ /\