1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00
heartcombo--simple_form/lib/simple_form/components/hints.rb

22 lines
441 B
Ruby
Raw Normal View History

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
html_options_for(:hint, [:hint])
end
end
end
end