Sha256: 444724b7c1c3fccfe22d0c0e594754558bc43994e3ccc9627af8a9c5b8d027fd

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

module SimpleFormWithClientValidation
  module Components
    # Needs to be enabled in order to do automatic lookups.
    module Hints
      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

      def has_hint?
        hint.present?
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_form_with_client_validation-0.0.2 lib/simple_form_with_client_validation/components/hints.rb
simple_form_with_client_validation-0.0.0 lib/simple_form_with_client_validation/components/hints.rb