diff options
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r-- | actionpack/CHANGELOG.md | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 3d507392b1..b4d3da3603 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,8 +1,10 @@ -* Fix generating a path for engine inside a resources block (#8533) +* Fix generating a path for engine inside a resources block. + + Fixes #8533. *Piotr Sarnacki* -* Add Mime::Type.register "text/vcard", :vcf to the default list of mime types +* Add `Mime::Type.register "text/vcard", :vcf` to the default list of mime types. *DHH* @@ -26,7 +28,7 @@ The request variant is a specialization of the request format, like `:tablet`, `:phone`, or `:desktop`. - You can set the variant in a before_action: + You can set the variant in a `before_action`: request.variant = :tablet if request.user_agent =~ /iPad/ @@ -45,6 +47,14 @@ app/views/projects/show.html+tablet.erb app/views/projects/show.html+phone.erb + You can also simplify the variants definition using the inline syntax: + + respond_to do |format| + format.js { render "trash" } + format.html.phone { redirect_to progress_path } + format.html.none { render "trash" } + end + *Łukasz Strzałkowski* * Fix header `Content-Type: #<Mime::NullType:...>` in localized template. @@ -85,9 +95,7 @@ * Add `session#fetch` method - fetch behaves similarly to [Hash#fetch](http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch), - with the exception that the returned value is always saved into the session. - + fetch behaves like [Hash#fetch](http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch). It returns a value from the hash for the given key. If the key can’t be found, there are several options: |