module Speedo module LayoutHelper # Implements the Paul Irish IE conditional comments HTML tag--in HAML. # http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ def cc_html(options={}, &blk) attrs = options.map { |(k, v)| " #{h k}='#{h v}'" }.join('') [ "", "", "", "", " ", capture_haml(&blk).strip, "" ].join("\n") end end end ActionView::Base.send :include, Speedo::LayoutHelper