2010-01-09 15:05:02 +00:00
|
|
|
module SimpleForm
|
|
|
|
module Components
|
|
|
|
module Hints
|
|
|
|
def hint
|
|
|
|
template.content_tag(hint_tag, hint_text, hint_html_options) unless hint_text.blank?
|
|
|
|
end
|
|
|
|
|
|
|
|
def hint_tag
|
|
|
|
options[:hint_tag] || SimpleForm.hint_tag
|
|
|
|
end
|
|
|
|
|
|
|
|
def hint_text
|
|
|
|
@hint_text ||= options[:hint] || translate(:hints)
|
|
|
|
end
|
|
|
|
|
|
|
|
def hint_html_options
|
2010-10-15 14:54:33 +00:00
|
|
|
html_options_for(:hint, [SimpleForm.hint_class])
|
2010-01-09 15:05:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2010-09-22 18:45:22 +00:00
|
|
|
end
|