aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorBogdan <bogdanvlviv@gmail.com>2016-03-25 22:04:58 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2016-03-27 17:20:28 +0300
commit3a37c4e371a51f26c33ca3183f8f09b9c94e3a00 (patch)
treeaf3cd8c07dc5077f28cf2abe5bb2b77fb49a746d /actionpack
parent168836772753bfa7d2bc11ab574a7a8f71a220e0 (diff)
downloadrails-3a37c4e371a51f26c33ca3183f8f09b9c94e3a00.tar.gz
rails-3a37c4e371a51f26c33ca3183f8f09b9c94e3a00.tar.bz2
rails-3a37c4e371a51f26c33ca3183f8f09b9c94e3a00.zip
extension synonyms yml and yaml
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG.md4
-rw-r--r--actionpack/lib/action_dispatch/http/mime_types.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 97ce7ffc75..1b153300b0 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Add extension synonyms `yml` and `yaml` for MIME type `application/x-yaml`.
+
+ *bogdanvlviv*
+
* When a `respond_to` collector with a block doesn't have a response, then
a `:no_content` response should be rendered. This brings the default
rendering behavior introduced by https://github.com/rails/rails/issues/19036
diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb
index 66cea88256..8b04174f1f 100644
--- a/actionpack/lib/action_dispatch/http/mime_types.rb
+++ b/actionpack/lib/action_dispatch/http/mime_types.rb
@@ -21,7 +21,7 @@ Mime::Type.register "video/mpeg", :mpeg, [], %w(mpg mpeg mpe)
Mime::Type.register "application/xml", :xml, %w( text/xml application/x-xml )
Mime::Type.register "application/rss+xml", :rss
Mime::Type.register "application/atom+xml", :atom
-Mime::Type.register "application/x-yaml", :yaml, %w( text/yaml )
+Mime::Type.register "application/x-yaml", :yaml, %w( text/yaml ), %w(yml yaml)
Mime::Type.register "multipart/form-data", :multipart_form
Mime::Type.register "application/x-www-form-urlencoded", :url_encoded_form