Sha256: d798c0a2c45d6d032df2b508c9ad3b9dd08486274ac50decf69a93d38cfa3910

Contents?: true

Size: 399 Bytes

Versions: 10

Compression:

Stored size: 399 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_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

10 entries across 10 versions & 3 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/simple_form-2.0.4/lib/simple_form/components/hints.rb
simple_form-2.0.4 lib/simple_form/components/hints.rb
simple_form-2.0.3 lib/simple_form/components/hints.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/simple_form-2.0.2/lib/simple_form/components/hints.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/simple_form-2.0.2/lib/simple_form/components/hints.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/simple_form-2.0.2/lib/simple_form/components/hints.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/simple_form-2.0.2/lib/simple_form/components/hints.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/simple_form-2.0.2/lib/simple_form/components/hints.rb
simple_form-2.0.2 lib/simple_form/components/hints.rb
ehoch_simple_form-2.0.2.dev lib/simple_form/components/hints.rb