module SimpleForm::Components::Hints

Needs to be enabled in order to do automatic lookups.

Public Instance Methods

has_hint?() click to toggle source
# File lib/simple_form/components/hints.rb, line 13
def has_hint?
  hint.present?
end
hint() click to toggle source
# File lib/simple_form/components/hints.rb, line 5
def hint
  @hint ||= begin
    hint = options[:hint]
    hint_content = hint.is_a?(String) ? hint : translate(:hints)
    hint_content.html_safe if hint_content
  end
end