aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r--actionpack/CHANGELOG.md58
1 files changed, 56 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index f6ffe45490..bf964d06e9 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,57 @@
+* Add request encoding and response parsing to integration tests.
+
+ What previously was:
+
+ ```ruby
+ require 'test_helper'
+
+ class ApiTest < ActionDispatch::IntegrationTest
+ test 'creates articles' do
+ assert_difference -> { Article.count } do
+ post articles_path(format: :json),
+ params: { article: { title: 'Ahoy!' } }.to_json,
+ headers: { 'Content-Type' => 'application/json' }
+ end
+
+ assert_equal({ id: Article.last.id, title: 'Ahoy!' }, JSON.parse(response.body))
+ end
+ end
+ ```
+
+ Can now be written as:
+
+ ```ruby
+ require 'test_helper'
+
+ class ApiTest < ActionDispatch::IntegrationTest
+ test 'creates articles' do
+ assert_difference -> { Article.count } do
+ post articles_path, { article: { title: 'Ahoy!' } }, as: :json
+ end
+
+ assert_equal({ id: Article.last.id, title: 'Ahoy!' }, response.parsed_body)
+ end
+ end
+ ```
+
+ *Kasper Timm Hansen*
+
+* Add image/svg+xml as a default mime type.
+
+ *DHH*
+
+## Rails 5.0.0.beta2 (February 01, 2016) ##
+
+* Add `-g` and `-c` (short for _grep_ and _controller_ respectively) options
+ to `bin/rake routes`. These options return the url `name`, `verb` and
+ `path` field that match the pattern or match a specific controller.
+
+ Deprecate `CONTROLLER` env variable in `bin/rake routes`.
+
+ See #18902.
+
+ *Anton Davydov* & *Vipul A M*
+
* Response etags to always be weak: Prefixes 'W/' to value returned by
`ActionDispatch::Http::Cache::Response#etag=`, such that etags set in
`fresh_when` and `stale?` are weak.
@@ -171,11 +225,11 @@
* Accessing mime types via constants like `Mime::HTML` is deprecated. Please
change code like this:
- Mime::HTML
+ Mime::HTML
To this:
- Mime[:html]
+ Mime[:html]
This change is so that Rails will not manage a list of constants, and fixes
an issue where if a type isn't registered you could possibly get the wrong