Sha256: 7a760289f2d7cfb95fa276d1d0a59889ab56fcc531f803f505f0a3a0fce15491
Contents?: true
Size: 802 Bytes
Versions: 1
Compression:
Stored size: 802 Bytes
Contents
module FacadesHelper include Facades::Helpers def facade_assets content = if_ie(8) do javascript_include_tag("https://html5shim.googlecode.com/svn/trunk/html5.js") end content.to_s.html_safe end ## # Render an IE conditional statement. By default conditionals use a less-than-or-equal-to format. Use the `specific` # param to force only that version. # # @param version [Integer] The IE version to target # @param specific [Boolean] optional Target the IE version specificially. # # def if_ie(version, specific = false, &block) content = capture(&block) condition = specific ? "IE #{version}" : "lte IE #{version}" str = "<!--[if #{condition}]>" str << content.html_safe.lstrip str << "<![endif]-->" str.html_safe end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facades-0.0.2 | app/helpers/facades_helper.rb |