1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/abstract_controller
Jeremy Daer 565094a8b5 Use Mime[:foo] instead of Mime::Type[:FOO] for back compat
Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
that support multiple Rails versions would've had to feature-detect
whether to use `Mime::Type[:FOO]` or `Mime::FOO`.

`Mime[:foo]` has been around for ages to look up registered MIME types
by symbol / extension, though, so libraries and plugins can safely
switch to that without breaking backward- or forward-compatibility.

Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
by type or extension, so it's not available as `Mime[:all]`. We use it
internally as a wildcard for `respond_to` negotiation. If you use this
internal constant, continue to reference it with `Mime::ALL`.

Ref. efc6dd550e
2015-10-06 11:29:30 -07:00
..
railties Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846 2015-01-31 23:12:41 -05:00
asset_paths.rb 🔥 Rails asset id support 2012-10-15 09:47:16 -05:00
base.rb Remove not used requires 2015-09-01 20:36:47 +02:00
callbacks.rb Raise ArgumentError if an unrecognised callback is skipped 2015-04-03 09:37:19 +01:00
collector.rb Use Mime[:foo] instead of Mime::Type[:FOO] for back compat 2015-10-06 11:29:30 -07:00
helpers.rb Freeze string literals when not mutated. 2015-07-19 17:45:10 -05:00
logger.rb avoid empty api pages 2012-04-08 01:56:41 +05:30
rendering.rb Use Mime[:foo] instead of Mime::Type[:FOO] for back compat 2015-10-06 11:29:30 -07:00
translation.rb ActionController#translate also lookups shortcut without action name 2013-10-22 18:17:05 +04:00
url_for.rb fixed a typo [ci skip] 2014-05-17 00:29:09 +09:00