blob: 6c3091153f9ec330edb77023f00b9a877b87f39e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
**DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON https://guides.rubyonrails.org.**
Ruby on Rails 6.0 Release Notes
===============================
Highlights in Rails 6.0:
* Action Mailbox
* Action Text
* Parallel Testing
* Action Cable Testing
These release notes cover only the major changes. To learn about various bug
fixes and changes, please refer to the change logs or check out the [list of
commits](https://github.com/rails/rails/commits/6-0-stable) in the main Rails
repository on GitHub.
--------------------------------------------------------------------------------
Upgrading to Rails 6.0
----------------------
If you're upgrading an existing application, it's a great idea to have good test
coverage before going in. You should also first upgrade to Rails 5.2 in case you
haven't and make sure your application still runs as expected before attempting
an update to Rails 6.0. A list of things to watch out for when upgrading is
available in the
[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-5-2-to-rails-6-0)
guide.
Major Features
--------------
### Action Mailbox
[Pull Request](https://github.com/rails/rails/pull/34786)
[Action Mailbox](https://github.com/rails/rails/tree/6-0-stable/actionmailbox) allows you
to route incoming emails to controller-like mailboxes.
You can read more about Action Mailbox in the [Action Mailbox Basics](action_mailbox_basics.html) guide.
### Action Text
[Pull Request](https://github.com/rails/rails/pull/34873)
[Action Text](https://github.com/rails/rails/tree/6-0-stable/actiontext)
brings rich text content and editing to Rails. It includes
the [Trix editor](https://trix-editor.org) that handles everything from formatting
to links to quotes to lists to embedded images and galleries.
The rich text content generated by the Trix editor is saved in its own
RichText model that's associated with any existing Active Record model in the application.
Any embedded images (or other attachments) are automatically stored using
Active Storage and associated with the included RichText model.
You can read more about Action Text in the [Action Text Overview](action_text_overview.html) guide.
### Parallel Testing
[Pull Request](https://github.com/rails/rails/pull/31900)
[Parallel Testing](testing.html#parallel-testing) allows you to parallelize your
test suite. While forking processes is the default method, threading is
supported as well. Running tests in parallel reduces the time it takes
your entire test suite to run.
### Action Cable Testing
[Pull Request](https://github.com/rails/rails/pull/33659)
[Action Cable testing tools](testing.html#testing-action-cable) allow you to test your
Action Cable functionality at any level: connections, channels, broadcasts.
Railties
--------
Please refer to the [Changelog][railties] for detailed changes.
### Removals
* Remove deprecated `after_bundle` helper inside plugins templates.
([Commit](https://github.com/rails/rails/commit/4d51efe24e461a2a3ed562787308484cd48370c7))
* Remove deprecated support to `config.ru` that uses the application
class as argument of `run`.
([Commit](https://github.com/rails/rails/commit/553b86fc751c751db504bcbe2d033eb2bb5b6a0b))
* Remove deprecated `environment` argument from the rails commands.
([Commit](https://github.com/rails/rails/commit/e20589c9be09c7272d73492d4b0f7b24e5595571))
* Remove deprecated `capify!` method in generators and templates.
([Commit](https://github.com/rails/rails/commit/9d39f81d512e0d16a27e2e864ea2dd0e8dc41b17))
* Remove deprecated `config.secret_token`.
([Commit](https://github.com/rails/rails/commit/46ac5fe69a20d4539a15929fe48293e1809a26b0))
### Deprecations
* Deprecate passing Rack server name as a regular argument to `rails server`.
([Pull Request](https://github.com/rails/rails/pull/32058))
* Deprecate support for using `HOST` environment to specify server IP.
([Pull Request](https://github.com/rails/rails/pull/32540))
* Deprecate accessing hashes returned by `config_for` by non-symbol keys.
([Pull Request](https://github.com/rails/rails/pull/35198))
### Notable changes
* Add an explicit option `--using` or `-u` for specifying the server for the
`rails server` command.
([Pull Request](https://github.com/rails/rails/pull/32058))
* Add ability to see the output of `rails routes` in expanded format.
([Pull Request](https://github.com/rails/rails/pull/32130))
* Run the seed database task using inline Active Job adapter.
([Pull Request](https://github.com/rails/rails/pull/34953))
* Add a command `rails db:system:change` to change the database of the application.
([Pull Request](https://github.com/rails/rails/pull/34832))
* Add `rails test:channels` command to test only Action Cable channels.
([Pull Request](https://github.com/rails/rails/pull/34947))
* Introduce guard against DNS rebinding attacks.
([Pull Request](https://github.com/rails/rails/pull/33145))
* Add ability to abort on failure while running generator commands.
([Pull Request](https://github.com/rails/rails/pull/34420))
* Make Webpacker the default JavaScript compiler for Rails 6.
([Pull Request](https://github.com/rails/rails/pull/33079))
* Add multiple database support for `rails db:migrate:status` command.
([Pull Request](https://github.com/rails/rails/pull/34137))
* Add ability to use different migration paths from multiple databases in
the generators.
([Pull Request](https://github.com/rails/rails/pull/34021))
* Add support for multi environment credentials.
([Pull Request](https://github.com/rails/rails/pull/33521))
* Make `null_store` as default cache store in test environment.
([Pull Request](https://github.com/rails/rails/pull/33773))
Action Cable
------------
Please refer to the [Changelog][action-cable] for detailed changes.
### Removals
### Deprecations
### Notable changes
* The ActionCable javascript package has been converted from CoffeeScript
to ES2015, and we now publish the source code in the npm distribution.
This allows ActionCable users to depend on the javascript source code
rather than the compiled code, which can produce smaller javascript bundles.
This change includes some breaking changes to optional parts of the
ActionCable javascript API:
- Configuration of the WebSocket adapter and logger adapter have been moved
from properties of `ActionCable` to properties of `ActionCable.adapters`.
- The `ActionCable.startDebugging()` and `ActionCable.stopDebugging()`
methods have been removed and replaced with the property
`ActionCable.logger.enabled`.
Action Pack
-----------
Please refer to the [Changelog][action-pack] for detailed changes.
### Removals
### Deprecations
### Notable changes
Action View
-----------
Please refer to the [Changelog][action-view] for detailed changes.
### Removals
### Deprecations
### Notable changes
Action Mailer
-------------
Please refer to the [Changelog][action-mailer] for detailed changes.
### Removals
### Deprecations
### Notable changes
Active Record
-------------
Please refer to the [Changelog][active-record] for detailed changes.
### Removals
### Deprecations
### Notable changes
Active Storage
--------------
Please refer to the [Changelog][active-storage] for detailed changes.
### Removals
### Deprecations
### Notable changes
Active Model
------------
Please refer to the [Changelog][active-model] for detailed changes.
### Removals
### Deprecations
### Notable changes
* Add a configuration option to customize format of the `ActiveModel::Errors#full_message`.
([Pull Request](https://github.com/rails/rails/pull/32956))
* Add support for configuring attribute name for `has_secure_password`.
([Pull Request](https://github.com/rails/rails/pull/26764))
* Add `#slice!` method to `ActiveModel::Errors`.
([Pull Request](https://github.com/rails/rails/pull/34489))
* Add `ActiveModel::Errors#of_kind?` to check presence of a specific error.
([Pull Request](https://github.com/rails/rails/pull/34866))
Active Support
--------------
Please refer to the [Changelog][active-support] for detailed changes.
### Removals
### Deprecations
### Notable changes
Active Job
----------
Please refer to the [Changelog][active-job] for detailed changes.
### Removals
### Deprecations
### Notable changes
Ruby on Rails Guides
--------------------
Please refer to the [Changelog][guides] for detailed changes.
### Notable changes
Credits
-------
See the
[full list of contributors to Rails](https://contributors.rubyonrails.org/)
for the many people who spent many hours making Rails, the stable and robust
framework it is. Kudos to all of them.
[railties]: https://github.com/rails/rails/blob/6-0-stable/railties/CHANGELOG.md
[action-pack]: https://github.com/rails/rails/blob/6-0-stable/actionpack/CHANGELOG.md
[action-view]: https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md
[action-mailer]: https://github.com/rails/rails/blob/6-0-stable/actionmailer/CHANGELOG.md
[action-cable]: https://github.com/rails/rails/blob/6-0-stable/actioncable/CHANGELOG.md
[active-record]: https://github.com/rails/rails/blob/6-0-stable/activerecord/CHANGELOG.md
[active-storage]: https://github.com/rails/rails/blob/6-0-stable/activestorage/CHANGELOG.md
[active-model]: https://github.com/rails/rails/blob/6-0-stable/activemodel/CHANGELOG.md
[active-support]: https://github.com/rails/rails/blob/6-0-stable/activesupport/CHANGELOG.md
[active-job]: https://github.com/rails/rails/blob/6-0-stable/activejob/CHANGELOG.md
[guides]: https://github.com/rails/rails/blob/6-0-stable/guides/CHANGELOG.md
|