diff options
author | Jorge Bejar <jorge@wyeworks.com> | 2015-12-09 14:18:13 -0300 |
---|---|---|
committer | Jorge Bejar <jorge@wyeworks.com> | 2015-12-09 14:18:13 -0300 |
commit | cdb7a8477ff19f8ed6f549cedc901bd5934a61e8 (patch) | |
tree | 36b3a6c18ca2efffbd5a08b54f49c79965953111 /actionpack | |
parent | 3a94ced8a15da6d046bc8fa30d69c944038e8ced (diff) | |
download | rails-cdb7a8477ff19f8ed6f549cedc901bd5934a61e8.tar.gz rails-cdb7a8477ff19f8ed6f549cedc901bd5934a61e8.tar.bz2 rails-cdb7a8477ff19f8ed6f549cedc901bd5934a61e8.zip |
Avoid calling AD::MimeNegotiation#format_from_path_extension method twice
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_negotiation.rb | 4 |
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 004713ec1a..0152c17ed4 100644 --- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb +++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb @@ -67,8 +67,8 @@ module ActionDispatch v = if params_readable Array(Mime[parameters[:format]]) - elsif format_from_path_extension - [Mime[format_from_path_extension]] + elsif format = format_from_path_extension + Array(Mime[format]) elsif use_accept_header && valid_accept_header accepts elsif xhr? |