Sha256: 02d41d78236d711b1ece404ca1b625692dce93d605cccf4ca06d2e8572e1abaf

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

module Storefront
  class Form
    module Hints      
      def hints_for(key, options = {})
        value = options[:hint_attributes].delete(:value)
        template.capture_haml do
          if value.present?
            template.haml_tag :figure, options[:hint_attributes] do
              template.haml_concat value.html_safe
            end
          else
            template.haml_tag :figure, options[:hint_attributes]
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
storefront-0.2.1 lib/storefront/form/hints.rb
storefront-0.2.0 lib/storefront/form/hints.rb