File ./lib/rails/generators/rails/app/templates/config/environments/development.rb.tt:
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
File ./lib/rails/application.rb:
middleware.use ::ActionDispatch::BestStandardsSupport,
config.action_dispatch.best_standards_support if
config.action_dispatch.best_standards_support
What's the point of setting action_dispatch.best_standards_support to
Symbol when we only care whether it is true or false ?
Do we expect that in future there will be other possible values for
this setting ?
Robert Pankowecki
And one more question: Why is this line
"config.action_dispatch.best_standards_support = :builtin" added only
to environments/development.rb file ? Why are we adding it when the
default is True (based on ./actionpack/lib/action_dispatch/railtie.rb)
?
The fact that we are setting it only in development environment to an
unsupported value that does not change the behavior at all makes me a
little confused.
Robert Pankowecki
I don’t know why it’s different in the development environment but from actionpack/lib/action_dispatch/middleware/best_standards_support.rb:
case type
when true
"IE=Edge,chrome=1"
when :builtin
"IE=Edge"
when false
nil
end
The bit of history I found: "[Improve best_standards_support to use only IE=Edge in development mode](https://github.com/rails/rails/commit/6767946374353f90ce05e68d38bcb93dcb8bae56)"
So it's not an unsupported value, but that doesn't say why we do so in the development environment.
Franck
My guess is that we do now want to test IE using Chrome mode in
development environment because we want to use the application like a
user with normal IE to see possible differences in behavior.
Robert Pankowecki
...My guess is that we do NOT want ...