Skip to content

Commit c5f2b41

Browse files
committed
Fix 4.2 release note rendered display.
1 parent 0673976 commit c5f2b41

File tree

2 files changed

+48
-41
lines changed

2 files changed

+48
-41
lines changed

source/4_2_release_notes.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ Please refer to the [Changelog][railties] for detailed changes.
7676
* Introduced `Rails.gem_version` as a convenience method to return `Gem::Version.new(Rails.version)`.
7777
([Pull Request](https://github.com/rails/rails/pull/14101))
7878

79-
8079
Action Pack
8180
-----------
8281

@@ -87,37 +86,43 @@ Please refer to the [Changelog][action-pack] for detailed changes.
8786
* Deprecated support for setting the `:to` option of a router to a symbol or a
8887
string that does not contain a `#` character:
8988

90-
get '/posts', to: MyRackApp => (No change necessary)
91-
get '/posts', to: 'post#index' => (No change necessary)
92-
get '/posts', to: 'posts' => get '/posts', controller: :posts
93-
get '/posts', to: :index => get '/posts', action: :index
89+
```ruby
90+
get '/posts', to: MyRackApp => (No change necessary)
91+
get '/posts', to: 'post#index' => (No change necessary)
92+
get '/posts', to: 'posts' => get '/posts', controller: :posts
93+
get '/posts', to: :index => get '/posts', action: :index
94+
```
9495

95-
([Commit](https://github.com/rails/rails/commit/cc26b6b7bccf0eea2e2c1a9ebdcc9d30ca7390d9))
96+
([Commit](https://github.com/rails/rails/commit/cc26b6b7bccf0eea2e2c1a9ebdcc9d30ca7390d9))
9697

9798
### Notable changes
9899

99100
* The `*_filter` family methods has been removed from the documentation. Their
100101
usage are discouraged in favor of the `*_action` family methods:
101102

102-
after_filter => after_action
103-
append_after_filter => append_after_action
104-
append_around_filter => append_around_action
105-
append_before_filter => append_before_action
106-
around_filter => around_action
107-
before_filter => before_action
108-
prepend_after_filter => prepend_after_action
109-
prepend_around_filter => prepend_around_action
110-
prepend_before_filter => prepend_before_action
111-
skip_after_filter => skip_after_action
112-
skip_around_filter => skip_around_action
113-
skip_before_filter => skip_before_action
114-
skip_filter => skip_action_callback
115-
116-
If your application is depending on these methods, you should use the
117-
replacement `*_action` methods instead. These methods will be deprecated in
118-
the future and eventually removed from Rails.
119-
(Commit [1](https://github.com/rails/rails/commit/6c5f43bab8206747a8591435b2aa0ff7051ad3de),
120-
[2](https://github.com/rails/rails/commit/489a8f2a44dc9cea09154ee1ee2557d1f037c7d4))
103+
```
104+
after_filter => after_action
105+
append_after_filter => append_after_action
106+
append_around_filter => append_around_action
107+
append_before_filter => append_before_action
108+
around_filter => around_action
109+
before_filter => before_action
110+
prepend_after_filter => prepend_after_action
111+
prepend_around_filter => prepend_around_action
112+
prepend_before_filter => prepend_before_action
113+
skip_after_filter => skip_after_action
114+
skip_around_filter => skip_around_action
115+
skip_before_filter => skip_before_action
116+
skip_filter => skip_action_callback
117+
```
118+
119+
If your application is depending on these methods, you should use the
120+
replacement `*_action` methods instead. These methods will be deprecated in
121+
the future and eventually removed from Rails.
122+
123+
(Commit [1](https://github.com/rails/rails/commit/6c5f43bab8206747a8591435b2aa0ff7051ad3de),
124+
[2](https://github.com/rails/rails/commit/489a8f2a44dc9cea09154ee1ee2557d1f037c7d4))
125+
121126

122127
* Added HTTP method `MKCALENDAR` from RFC-4791
123128
([Pull Request](https://github.com/rails/rails/pull/15121))
@@ -211,12 +216,12 @@ for detailed changes.
211216
is not fully possible because the Ruby range does not support excluded
212217
beginnings.
213218

214-
The current solution of incrementing the beginning is not correct and is now
215-
deprecated. For subtypes where we don't know how to increment (e.g. `#succ`
216-
is not defined) it will raise an `ArgumentError` for ranges with excluding
217-
beginnings.
219+
The current solution of incrementing the beginning is not correct
220+
and is now deprecated. For subtypes where we don't know how to increment
221+
(e.g. `#succ` is not defined) it will raise an `ArgumentError` for ranges with
222+
excluding beginnings.
218223
219-
([Commit](https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3))
224+
([Commit](https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3))
220225
221226
* Deprecated broken support for automatic detection of counter caches on
222227
`has_many :through` associations. You should instead manually specify the

source/zh-CN/4_2_release_notes.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,14 @@ Action Pack
6868

6969
* 弃用路由的 `:to` 选项里,`:to` 可以指向符号或不含井号的字串这两个功能。
7070

71-
get '/posts', to: MyRackApp => (No change necessary)
72-
get '/posts', to: 'post#index' => (No change necessary)
73-
get '/posts', to: 'posts' => get '/posts', controller: :posts
74-
get '/posts', to: :index => get '/posts', action: :index
71+
```ruby
72+
get '/posts', to: MyRackApp => (No change necessary)
73+
get '/posts', to: 'post#index' => (No change necessary)
74+
get '/posts', to: 'posts' => get '/posts', controller: :posts
75+
get '/posts', to: :index => get '/posts', action: :index
76+
```
7577

76-
([Commit](https://github.com/rails/rails/commit/cc26b6b7bccf0eea2e2c1a9ebdcc9d30ca7390d9))
78+
([Commit](https://github.com/rails/rails/commit/cc26b6b7bccf0eea2e2c1a9ebdcc9d30ca7390d9))
7779

7880
### 值得一提的变化
7981

@@ -95,10 +97,10 @@ Action Pack
9597
skip_filter => skip_action_callback
9698
```
9799

98-
若应用程序依赖这些 `*_filter` 方法,应该使用 `*_action` 方法替换。
99-
因为 `*_filter` 方法最终会从 Rails 里拿掉。
100-
(Commit [1](https://github.com/rails/rails/commit/6c5f43bab8206747a8591435b2aa0ff7051ad3de),
101-
[2](https://github.com/rails/rails/commit/489a8f2a44dc9cea09154ee1ee2557d1f037c7d4))
100+
若应用程序依赖这些 `*_filter` 方法,应该使用 `*_action` 方法替换。
101+
因为 `*_filter` 方法最终会从 Rails 里拿掉。
102+
(Commit [1](https://github.com/rails/rails/commit/6c5f43bab8206747a8591435b2aa0ff7051ad3de),
103+
[2](https://github.com/rails/rails/commit/489a8f2a44dc9cea09154ee1ee2557d1f037c7d4))
102104

103105
*RFC-4791 新增 HTTP 方法 `MKCALENDAR`
104106
([Pull Request](https://github.com/rails/rails/pull/15121))
@@ -178,9 +180,9 @@ Active Record
178180

179181
* 弃用仅支持一半的 PostgreSQL 范围数值(不包含起始值)。目前我们把 PostgreSQL 的范围对应到 Ruby 的范围。但由于 Ruby 的范围不支援不包含起始值,所以无法完全转换。
180182

181-
目前的解决方法是将起始数递增,这是不对的,已经弃用了。关于不知如何递增的子类型(比如没有定义 `#succ`)会对不包含起始值的抛出 `ArgumentError`
183+
目前的解决方法是将起始数递增,这是不对的,已经弃用了。关于不知如何递增的子类型(比如没有定义 `#succ`)会对不包含起始值的抛出 `ArgumentError`
182184

183-
([Commit](https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3))
185+
([Commit](https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3))
184186

185187
* 弃用对 `has_many :through` 自动侦测 counter cache 的支持。要自己对 `has_many`
186188
`belongs_to` 关联,给 `through` 的纪录手动设定。

0 commit comments

Comments
 (0)