allow HTML tags in error notifications messages
This commit is contained in:
parent
18b73ddba4
commit
9dfff667a7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue