2010-01-09 15:05:02 +00:00
|
|
|
module SimpleForm
|
|
|
|
module Components
|
2011-12-04 14:49:57 +00:00
|
|
|
# Needs to be enabled in order to do automatic lookups.
|
2010-01-09 15:05:02 +00:00
|
|
|
module Hints
|
|
|
|
def hint
|
2012-01-11 20:12:49 +00:00
|
|
|
@hint ||= begin
|
|
|
|
hint = options[:hint]
|
2012-03-07 13:59:35 +00:00
|
|
|
hint_content = hint.is_a?(String) ? hint : translate(:hints)
|
|
|
|
hint_content.html_safe if hint_content
|
2011-12-04 14:49:57 +00:00
|
|
|
end
|
2011-09-03 10:55:53 +00:00
|
|
|
end
|
2012-01-10 21:00:14 +00:00
|
|
|
|
|
|
|
def has_hint?
|
|
|
|
hint.present?
|
|
|
|
end
|
2010-01-09 15:05:02 +00:00
|
|
|
end
|
|
|
|
end
|
2010-09-22 18:45:22 +00:00
|
|
|
end
|