From 6767946374353f90ce05e68d38bcb93dcb8bae56 Mon Sep 17 00:00:00 2001
From: wycats <wycats@gmail.com>
Date: Mon, 9 Aug 2010 11:48:31 -0700
Subject: Improve best_standards_support to use only IE=Edge in development
 mode

---
 .../action_dispatch/middleware/best_standards_support.rb    | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'actionpack')

diff --git a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
index df8f7766bb..69adcc419f 100644
--- a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
+++ b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
@@ -1,12 +1,21 @@
 module ActionDispatch
   class BestStandardsSupport
-    def initialize(app)
+    def initialize(app, type = true)
       @app = app
+
+      @header = case type
+      when true
+        "IE=Edge,chrome=1"
+      when :builtin
+        "IE=Edge"
+      when false
+        nil
+      end
     end
 
     def call(env)
       status, headers, body = @app.call(env)
-      headers["X-UA-Compatible"] = "IE=Edge,chrome=1"
+      headers["X-UA-Compatible"] = @header
       [status, headers, body]
     end
   end
-- 
cgit v1.2.3