Module: Formtastic::Inputs::Base::Hints

Included in:
Formtastic::Inputs::Base
Defined in:
lib/formtastic/inputs/base/hints.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) hint?

Returns:

  • (Boolean)


16
17
18
# File 'lib/formtastic/inputs/base/hints.rb', line 16

def hint?
  !hint_text.blank? && !hint_text.kind_of?(Hash)
end

- (Object) hint_html



6
7
8
9
10
11
12
13
14
# File 'lib/formtastic/inputs/base/hints.rb', line 6

def hint_html
  if hint?
    template.(
      :p, 
      Formtastic::Util.html_safe(hint_text), 
      :class => builder.default_hint_class
    )
  end
end

- (Object) hint_text



20
21
22
# File 'lib/formtastic/inputs/base/hints.rb', line 20

def hint_text
  localized_string(method, options[:hint], :hint)
end

- (Object) hint_text_from_options



24
25
26
# File 'lib/formtastic/inputs/base/hints.rb', line 24

def hint_text_from_options
  options[:hint]
end