allow HTML tags in error notifications messages

This commit is contained in:
Edison 2012-02-16 15:07:52 -02:00
parent 18b73ddba4
commit 9dfff667a7
2 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ module SimpleForm
end
def error_message
@message || translate_error_notification
(@message || translate_error_notification).html_safe
end
def error_notification_tag

View File

@ -60,4 +60,10 @@ class ErrorNotificationTest < ActionView::TestCase
assert_select 'div.error_notification'
end
end
test 'error notification should contain HTML tags' do
with_error_notification_for @user, :message => 'Erro encontrado ao criar <b>usuario</b>'
assert_select 'p.error_notification', 'Erro encontrado ao criar usuario'
assert_select 'p.error_notification b', 'usuario'
end
end