diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG.md | 21 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 2 |
2 files changed, 12 insertions, 11 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index c5b208f5b6..8f36af94b4 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -9,11 +9,12 @@ *Ville Lautanala* -* Add http_cache_forever to Action Controller, so we can cache a response that never gets expired. +* Add `http_cache_forever` to Action Controller, so we can cache a response + that never gets expired. *arthurnn* -* ActionController#translate supports symbols as shortcuts. +* `ActionController#translate` supports symbols as shortcuts. When shortcut is given it also lookups without action name. *Max Melentiev* @@ -42,14 +43,14 @@ request causing an incorrect behavior during the fall back to GET requests. Example: - ```ruby - draw do - get '/home' => 'test#index' - mount rack_app, at: '/' - end - head '/home' - assert_response :success - ``` + + draw do + get '/home' => 'test#index' + mount rack_app, at: '/' + end + head '/home' + assert_response :success + In this case, a HEAD request runs through the routes the first time and fails to match anything. Then, it runs through the list with the fallback and matches `get '/home'`. The original behavior would match the rack app in the first pass. diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 047a17937a..7e585aa244 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -45,7 +45,7 @@ module Mime # # respond_to do |format| # format.html - # format.ics { render text: @post.to_ics, mime_type: Mime::Type["text/calendar"] } + # format.ics { render text: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } # format.xml { render xml: @post } # end # end |