Sha256: c6b0ef853edc4eb923739f77a76c3d036488895c71aa824cba805bbb71334fbd

Contents?: true

Size: 335 Bytes

Versions: 3

Compression:

Stored size: 335 Bytes

Contents

module SimpleForm
  module Components
    # Needs to be enabled in order to do automatic lookups.
    module Hints
      def hint
        @hint ||= begin
          hint = options[:hint]
          hint.is_a?(String) ? hint : translate(:hints)
        end
      end

      def has_hint?
        hint.present?
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_form-2.0.1 lib/simple_form/components/hints.rb
simple_form-2.0.0 lib/simple_form/components/hints.rb
simple_form-2.0.0.rc lib/simple_form/components/hints.rb