Sha256: 456528a1d75cddce6acbcd3b0c5ee104286c36f8849575d26dadc709cc190d6d

Contents?: true

Size: 598 Bytes

Versions: 14

Compression:

Stored size: 598 Bytes

Contents

module FrontendHelpers
  module Html5Helper

    def html_tag(attrs = {}, &block)
      attrs.symbolize_keys!
      haml_concat "<!--[if lt IE 7]><html class='ie6 no-js'><![endif]-->".html_safe
      haml_concat "<!--[if IE 7]><html class='ie7 no-js'><![endif]-->".html_safe
      haml_concat "<!--[if IE 8]><html class='ie8 no-js'><![endif]-->".html_safe
      haml_concat "<!--[if gt IE 8]><!-->".html_safe
      haml_tag :html, attrs do
        haml_concat "<!--<![endif]-->".html_safe
        block.call
      end
    end

  end
end

ActionView::Base.send :include, FrontendHelpers::Html5Helper

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
frontend-helpers-0.1.3 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.1.2 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.1.1 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.1.0 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.9.1 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.9 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.8 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.7 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.6 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.5 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.4 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.3 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.2 lib/frontend-helpers/html5_helper.rb
frontend-helpers-0.0.1.beta.1 lib/frontend-helpers/html5_helper.rb