Module: SimpleFormWithClientValidation::Components::Hints
- Included in:
- Inputs::Base
- Defined in:
- lib/simple_form_with_client_validation/components/hints.rb
Overview
Needs to be enabled in order to do automatic lookups.
Instance Method Summary collapse
Instance Method Details
#has_hint? ⇒ Boolean
13 14 15 |
# File 'lib/simple_form_with_client_validation/components/hints.rb', line 13 def has_hint? hint.present? end |
#hint ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/simple_form_with_client_validation/components/hints.rb', line 5 def hint @hint ||= begin hint = [:hint] hint_content = hint.is_a?(String) ? hint : translate(:hints) hint_content.html_safe if hint_content end end |