Class: ActionDispatch::BestStandardsSupport
- Inherits:
-
Object
- Object
- ActionDispatch::BestStandardsSupport
- Defined in:
- lib/action_dispatch/middleware/best_standards_support.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, type = true) ⇒ BestStandardsSupport
constructor
A new instance of BestStandardsSupport.
Constructor Details
#initialize(app, type = true) ⇒ BestStandardsSupport
Returns a new instance of BestStandardsSupport.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/action_dispatch/middleware/best_standards_support.rb', line 3 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 |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 |
# File 'lib/action_dispatch/middleware/best_standards_support.rb', line 16 def call(env) status, headers, body = @app.call(env) headers["X-UA-Compatible"] = @header [status, headers, body] end |