0

Is there a good practice to organizing stylesheet/javascript asset files specifically for IE browsers with asset pipeline enabled in Rails 3? For example, I do not want to litter my .html.erb files with conditional comments similar to below for browser detections.

<!--[if !IE]> -->
According to the conditional comment this is not IE<br />
<!-- <![endif]-->
RubyFanatic
  • 2,241
  • 3
  • 22
  • 35
  • 1
    I ripped all that out of my apps a year or more ago. I rely on jquery, jquery-ui and simple_form. This seems compatible with IE 7+ Firefox & Safari with no browser checking. I assume it's all being handled out of sight in those systems and their attendant css stuff. I honestly can't understand how ANYBODY tolerates having to deal with browser detection! Cross Browser Compatibility was such a nightmare before I finally just stopped doing it, thank god my apps are more business like. I'd hate to have to develop leading edge consumer stuff AND deal with cross browser compatibility. – RadBrad Jan 27 '13 at 06:27

1 Answers1

0

You could put them into a partial in app/views/layouts/. This is also what Michael Hartl does with HTML5 Shim his tutorial: http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec-partials

amacy
  • 280
  • 6
  • 14