Refactored html support for hints

This commit is contained in:
Tom Stone 2012-03-07 13:59:35 +00:00
parent ccdcde855b
commit 739f4da2c1
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ module SimpleForm
def hint def hint
@hint ||= begin @hint ||= begin
hint = options[:hint] hint = options[:hint]
hint.is_a?(String) ? hint.html_safe : (translate(:hints).html_safe if translate(:hints)) hint_content = hint.is_a?(String) ? hint : translate(:hints)
hint_content.html_safe if hint_content
end end
end end