Sha256: 0493b2894d1109e70c32bc29dc447df3543a118f35b61ce1721f171ef87ab4ad

Contents?: true

Size: 598 Bytes

Versions: 4

Compression:

Stored size: 598 Bytes

Contents

module Formtastic
  module Inputs
    module Base
      module Hints
        
        def hint_html
          if hint?
            template.content_tag(
              :p, 
              hint_text.html_safe, 
              :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

4 entries across 4 versions & 2 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/inputs/base/hints.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/inputs/base/hints.rb
formtastic-4.0.0 lib/formtastic/inputs/base/hints.rb
formtastic-4.0.0.rc1 lib/formtastic/inputs/base/hints.rb