aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorLéo Hackin <leonardo.freire@giran.com.br>2010-11-18 08:25:38 -0200
committerLéo Hackin <leonardo.freire@giran.com.br>2010-11-18 08:25:38 -0200
commit03f141378705cb544986ad2db54169c8f1c464c0 (patch)
tree897fede643b34450d31e2a63def169bcacd91bfd /railties
parent126fbd7ed8a310bf940414c1b7ddab06b03d400e (diff)
downloadrails-03f141378705cb544986ad2db54169c8f1c464c0.tar.gz
rails-03f141378705cb544986ad2db54169c8f1c464c0.tar.bz2
rails-03f141378705cb544986ad2db54169c8f1c464c0.zip
Fix code for customize the error messages html adding a .html_safe of 8.3 section
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/active_record_validations_callbacks.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 374c0f84a5..444a1d4154 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -824,10 +824,10 @@ Here is a simple example where we change the Rails behaviour to always display t
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if instance.error_message.kind_of?(Array)
%(#{html_tag}<span class="validation-error">&nbsp;
- #{instance.error_message.join(',')}</span>)
+ #{instance.error_message.join(',')}</span>).html_safe
else
%(#{html_tag}<span class="validation-error">&nbsp;
- #{instance.error_message}</span>)
+ #{instance.error_message}</span>).html_safe
end
end
</ruby>