Refactored html support for hints
This commit is contained in:
parent
ccdcde855b
commit
739f4da2c1
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue