diff options
author | Léo Hackin <leonardo.freire@giran.com.br> | 2010-11-18 08:25:38 -0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-11-21 03:29:43 +0100 |
commit | f5a51a778804f7a48b8f43e591ad3bc6b828867e (patch) | |
tree | 5e7f71339958969d38c933077c7fbe6d2cf67e0b /railties/guides/source | |
parent | c8ab3992f85569e43055b9e57c67324f5d5088cd (diff) | |
download | rails-f5a51a778804f7a48b8f43e591ad3bc6b828867e.tar.gz rails-f5a51a778804f7a48b8f43e591ad3bc6b828867e.tar.bz2 rails-f5a51a778804f7a48b8f43e591ad3bc6b828867e.zip |
Fix code for customize the error messages html adding a .html_safe of 8.3 section
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/active_record_validations_callbacks.textile | 4 |
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 2a6f0715a9..fddd715feb 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"> - #{instance.error_message.join(',')}</span>) + #{instance.error_message.join(',')}</span>).html_safe else %(#{html_tag}<span class="validation-error"> - #{instance.error_message}</span>) + #{instance.error_message}</span>).html_safe end end </ruby> |