aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJorge Bejar <jorge@wyeworks.com>2015-12-29 12:41:57 -0300
committerJorge Bejar <jorge@wyeworks.com>2015-12-29 13:43:14 -0300
commit44ca804229cfdf7a149eed63a2f61f387f6f9fc8 (patch)
tree96f984dec9fbe8942dfc8a50349f255e00e7a3c7 /actionpack/lib
parent9a85da9367eaf65b4232a548ff1f2535ef3496cd (diff)
downloadrails-44ca804229cfdf7a149eed63a2f61f387f6f9fc8.tar.gz
rails-44ca804229cfdf7a149eed63a2f61f387f6f9fc8.tar.bz2
rails-44ca804229cfdf7a149eed63a2f61f387f6f9fc8.zip
Format from Accept headers have higher precedence than path extension format
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_negotiation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
index eb9c2a18cb..e9b25339dc 100644
--- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb
+++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
@@ -67,10 +67,10 @@ module ActionDispatch
v = if params_readable
Array(Mime[parameters[:format]])
- elsif extension_format = format_from_path_extension
- [extension_format]
elsif use_accept_header && valid_accept_header
accepts
+ elsif extension_format = format_from_path_extension
+ [extension_format]
elsif xhr?
[Mime[:js]]
else