Sha256: 3b7463b636754921b04e652029d41f13ff9b65b164f3b2f8f75e7e6dee47a23f

Contents?: true

Size: 616 Bytes

Versions: 12

Compression:

Stored size: 616 Bytes

Contents

module Formtastic
  module Inputs
    module Base
      module Hints
        
        def hint_html
          if hint?
            template.content_tag(
              :p, 
              Formtastic::Util.html_safe(hint_text), 
              :class => builder.default_hint_class
            )
          end
        end
        
        def hint?
          !hint_text.blank? && !hint_text.kind_of?(Hash)
        end

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

      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
formtastic-3.1.5 lib/formtastic/inputs/base/hints.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/formtastic-3.1.4/lib/formtastic/inputs/base/hints.rb
formtastic-3.1.4 lib/formtastic/inputs/base/hints.rb
formtastic-3.1.3 lib/formtastic/inputs/base/hints.rb
formtastic-3.1.2 lib/formtastic/inputs/base/hints.rb
formtastic-3.1.1 lib/formtastic/inputs/base/hints.rb
formtastic-3.1.0 lib/formtastic/inputs/base/hints.rb
formtastic-3.1.0.rc2 lib/formtastic/inputs/base/hints.rb
formtastic-3.1.0.rc1 lib/formtastic/inputs/base/hints.rb
formtastic-3.0.0 lib/formtastic/inputs/base/hints.rb
formtastic-3.0.0.rc2 lib/formtastic/inputs/base/hints.rb
formtastic-3.0.0.rc lib/formtastic/inputs/base/hints.rb