Skip to content

Commit ee614af

Browse files
committed
Merge pull request rails#17812 from jonatack/patch-8
4.2 release notes pass [skip ci]
2 parents 1b1f403 + acbc7a0 commit ee614af

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

guides/source/4_2_release_notes.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ the object itself. The new [Global ID](https://github.com/rails/globalid)
4747
library builds URIs and looks up the objects they reference. Passing Active
4848
Record objects as job arguments just works by using Global ID internally.
4949

50-
For example, if `trashable` is an AR this job runs just fine
50+
For example, if `trashable` is an Active Record object, then this job runs
51+
just fine with no serialization involved:
5152

5253
```ruby
5354
class TrashableCleanupJob < ActiveJob::Base
@@ -57,8 +58,6 @@ class TrashableCleanupJob < ActiveJob::Base
5758
end
5859
```
5960

60-
with no serialization involved.
61-
6261
See the [Active Job Basics](active_job_basics.html) guide for more
6362
information.
6463

@@ -80,9 +79,9 @@ on similar calls, skipping most of the query-generation work on subsequent
8079
calls. For more details, please refer to [Aaron Patterson's blog
8180
post](http://tenderlovemaking.com/2014/02/19/adequaterecord-pro-like-activerecord.html).
8281

83-
Active Record will automatically take advantage of this feature on the
82+
Active Record will automatically take advantage of this feature on
8483
supported operations without any user involvement or code changes. Here are
85-
some examples of the supported operations:
84+
some examples of supported operations:
8685

8786
```ruby
8887
Post.find(1) # First call generates and cache the prepared statement
@@ -96,10 +95,10 @@ post.comments(true)
9695
```
9796

9897
It's important to highlight that, as the examples above suggest, the prepared
99-
statements do not cache the values passed in the method calls, they rather
98+
statements do not cache the values passed in the method calls; rather, they
10099
have placeholders for them.
101100

102-
The caching is not used in the following scenarios:
101+
Caching is not used in the following scenarios:
103102

104103
- The model has a default scope
105104
- The model uses single table inheritance
@@ -119,7 +118,7 @@ The caching is not used in the following scenarios:
119118

120119
### Web Console
121120

122-
New applications generated from Rails 4.2 now come with the [Web
121+
New applications generated with Rails 4.2 now come with the [Web
123122
Console](https://github.com/rails/web-console) gem by default. Web Console adds
124123
an interactive Ruby console on every error page and provides a `console` view
125124
and controller helpers.
@@ -167,9 +166,9 @@ The following changes may require immediate action upon upgrade.
167166
### `render` with a String Argument
168167

169168
Previously, calling `render "foo/bar"` in a controller action was equivalent to
170-
`render file: "foo/bar"`. In Rails 4.2, this has been changed to mean `render template: "foo/bar"`
171-
instead. If you need to render a file, please change your code to use the
172-
explicit form (`render file: "foo/bar"`) instead.
169+
`render file: "foo/bar"`. In Rails 4.2, this has been changed to mean
170+
`render template: "foo/bar"` instead. If you need to render a file, please
171+
change your code to use the explicit form (`render file: "foo/bar"`) instead.
173172

174173
### `respond_with` / Class-Level `respond_to`
175174

@@ -210,8 +209,9 @@ end
210209

211210
Due to a [change in Rack](https://github.com/rack/rack/commit/28b014484a8ac0bbb388e7eaeeef159598ec64fc),
212211
`rails server` now listens on `localhost` instead of `0.0.0.0` by default. This
213-
should have minimal impact on the standard development workflow as both http://127.0.0.1:3000
214-
and http://localhost:3000 will continue to work as before on your own machine.
212+
should have minimal impact on the standard development workflow as both
213+
http://127.0.0.1:3000 and http://localhost:3000 will continue to work as before
214+
on your own machine.
215215

216216
However, with this change you will no longer be able to access the Rails
217217
server from a different machine, for example if your development environment
@@ -229,8 +229,8 @@ built upon [Loofah](https://github.com/flavorjones/loofah) and
229229
[Nokogiri](https://github.com/sparklemotion/nokogiri). The new sanitizer is
230230
more secure and its sanitization is more powerful and flexible.
231231

232-
Due to the new algorithm, sanitized output changes for certain pathological
233-
inputs.
232+
Due to the new algorithm, the sanitized output may be different for certain
233+
pathological inputs.
234234

235235
If you have a particular need for the exact output of the old sanitizer, you
236236
can add the [rails-deprecated_sanitizer](https://github.com/kaspth/rails-deprecated_sanitizer)
@@ -663,8 +663,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
663663
current environment.
664664
([Commit](https://github.com/rails/rails/commit/e2f232aba15937a4b9d14bd91e0392c6d55be58d))
665665
666-
* Introduced `ActiveRecord::Base#validate!` that raises `ActiveRecord::RecordInvalid` if the
667-
record is invalid.
666+
* Introduced `ActiveRecord::Base#validate!` that raises
667+
`ActiveRecord::RecordInvalid` if the record is invalid.
668668
([Pull Request](https://github.com/rails/rails/pull/8639))
669669
670670
* Introduced `validate` as an alias for `valid?`.
@@ -704,8 +704,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
704704
`SELECT`s.
705705
([Pull Request](https://github.com/rails/rails/pull/15866))
706706
707-
* `ActiveRecord::Base#reflections` now returns a hash with string keys instead of symbol keys.
708-
([Pull Request](https://github.com/rails/rails/pull/17718))
707+
* `ActiveRecord::Base#reflections` now returns a hash with string keys instead
708+
of symbol keys. ([Pull Request](https://github.com/rails/rails/pull/17718))
709709
710710
* The `references` method in migrations now supports a `type` option for
711711
specifying the type of the foreign key (e.g. `:uuid`).

0 commit comments

Comments
 (0)