Sha256: 6007cc2ec2d2398c42908d02a7fa3d6fd17739ce3567d9af0ecd00963d615f01

Contents?: true

Size: 438 Bytes

Versions: 10

Compression:

Stored size: 438 Bytes

Contents

module SimpleForm
  module Components
    module Hints
      def hint
        template.content_tag(hint_tag, hint_text, hint_html_options) unless hint_text.blank?
      end

      def hint_tag
        options[:hint_tag] || SimpleForm.hint_tag
      end

      def hint_text
        @hint_text ||= options[:hint] || translate(:hints)
      end

      def hint_html_options
        html_options_for(:hint, :hint)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
simple_form-1.0.4 lib/simple_form/components/hints.rb
simple_form-1.0.3 lib/simple_form/components/hints.rb
simple_form-1.0.2 lib/simple_form/components/hints.rb
simple_form-1.0.1 lib/simple_form/components/hints.rb
simple_form-1.2.0 lib/simple_form/components/hints.rb
simple_form-1.1.3 lib/simple_form/components/hints.rb
simple_form-1.1.2 lib/simple_form/components/hints.rb
simple_form-1.1.1 lib/simple_form/components/hints.rb
simple_form-1.1.0 lib/simple_form/components/hints.rb
simple_form-1.0.0 lib/simple_form/components/hints.rb