railties 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +721 -109
  3. data/MIT-LICENSE +1 -1
  4. data/RDOC_MAIN.md +99 -0
  5. data/README.rdoc +5 -5
  6. data/lib/minitest/rails_plugin.rb +64 -1
  7. data/lib/rails/api/task.rb +35 -4
  8. data/lib/rails/app_updater.rb +7 -2
  9. data/lib/rails/application/bootstrap.rb +21 -3
  10. data/lib/rails/application/configuration.rb +202 -66
  11. data/lib/rails/application/default_middleware_stack.rb +23 -2
  12. data/lib/rails/application/dummy_config.rb +19 -0
  13. data/lib/rails/application/finisher.rb +53 -45
  14. data/lib/rails/application.rb +161 -74
  15. data/lib/rails/application_controller.rb +1 -1
  16. data/lib/rails/autoloaders/inflector.rb +1 -1
  17. data/lib/rails/autoloaders.rb +40 -36
  18. data/lib/rails/backtrace_cleaner.rb +1 -1
  19. data/lib/rails/cli.rb +5 -2
  20. data/lib/rails/command/actions.rb +10 -12
  21. data/lib/rails/command/base.rb +55 -53
  22. data/lib/rails/command/environment_argument.rb +32 -16
  23. data/lib/rails/command/helpers/editor.rb +17 -12
  24. data/lib/rails/command.rb +85 -34
  25. data/lib/rails/commands/about/about_command.rb +14 -0
  26. data/lib/rails/commands/application/application_command.rb +2 -0
  27. data/lib/rails/commands/console/console_command.rb +17 -13
  28. data/lib/rails/commands/credentials/USAGE +53 -55
  29. data/lib/rails/commands/credentials/credentials_command/diffing.rb +5 -3
  30. data/lib/rails/commands/credentials/credentials_command.rb +64 -70
  31. data/lib/rails/commands/db/system/change/change_command.rb +2 -1
  32. data/lib/rails/commands/dbconsole/dbconsole_command.rb +34 -121
  33. data/lib/rails/commands/destroy/destroy_command.rb +3 -2
  34. data/lib/rails/commands/dev/dev_command.rb +1 -6
  35. data/lib/rails/commands/encrypted/USAGE +15 -20
  36. data/lib/rails/commands/encrypted/encrypted_command.rb +46 -35
  37. data/lib/rails/commands/gem_help/USAGE +16 -0
  38. data/lib/rails/commands/gem_help/gem_help_command.rb +13 -0
  39. data/lib/rails/commands/generate/generate_command.rb +2 -2
  40. data/lib/rails/commands/help/USAGE +13 -13
  41. data/lib/rails/commands/help/help_command.rb +21 -2
  42. data/lib/rails/commands/initializers/initializers_command.rb +1 -4
  43. data/lib/rails/commands/middleware/middleware_command.rb +17 -0
  44. data/lib/rails/commands/new/new_command.rb +2 -0
  45. data/lib/rails/commands/notes/notes_command.rb +2 -1
  46. data/lib/rails/commands/plugin/plugin_command.rb +2 -0
  47. data/lib/rails/commands/rake/rake_command.rb +25 -22
  48. data/lib/rails/commands/restart/restart_command.rb +14 -0
  49. data/lib/rails/commands/routes/routes_command.rb +13 -1
  50. data/lib/rails/commands/runner/USAGE +14 -12
  51. data/lib/rails/commands/runner/runner_command.rb +32 -20
  52. data/lib/rails/commands/secret/secret_command.rb +13 -0
  53. data/lib/rails/commands/secrets/USAGE +44 -49
  54. data/lib/rails/commands/secrets/secrets_command.rb +19 -38
  55. data/lib/rails/commands/server/server_command.rb +33 -27
  56. data/lib/rails/commands/test/USAGE +14 -0
  57. data/lib/rails/commands/test/test_command.rb +56 -14
  58. data/lib/rails/commands/unused_routes/unused_routes_command.rb +75 -0
  59. data/lib/rails/commands/version/version_command.rb +1 -0
  60. data/lib/rails/configuration.rb +5 -5
  61. data/lib/rails/console/app.rb +1 -4
  62. data/lib/rails/console/helpers.rb +2 -2
  63. data/lib/rails/deprecator.rb +7 -0
  64. data/lib/rails/engine/configuration.rb +5 -0
  65. data/lib/rails/engine.rb +43 -22
  66. data/lib/rails/gem_version.rb +2 -2
  67. data/lib/rails/generators/actions.rb +208 -72
  68. data/lib/rails/generators/active_model.rb +2 -2
  69. data/lib/rails/generators/app_base.rb +388 -112
  70. data/lib/rails/generators/app_name.rb +3 -14
  71. data/lib/rails/generators/base.rb +15 -7
  72. data/lib/rails/generators/database.rb +39 -1
  73. data/lib/rails/generators/erb/mailer/templates/layout.html.erb.tt +1 -1
  74. data/lib/rails/generators/generated_attribute.rb +14 -2
  75. data/lib/rails/generators/migration.rb +1 -2
  76. data/lib/rails/generators/model_helpers.rb +2 -1
  77. data/lib/rails/generators/named_base.rb +2 -2
  78. data/lib/rails/generators/rails/app/USAGE +22 -6
  79. data/lib/rails/generators/rails/app/app_generator.rb +88 -48
  80. data/lib/rails/generators/rails/app/templates/Dockerfile.tt +103 -0
  81. data/lib/rails/generators/rails/app/templates/Gemfile.tt +10 -10
  82. data/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +1 -1
  83. data/lib/rails/generators/rails/app/templates/bin/setup.tt +10 -1
  84. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +6 -17
  85. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +3 -3
  86. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +0 -2
  87. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +3 -3
  88. data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +59 -0
  89. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +11 -1
  90. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +28 -24
  91. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +10 -6
  92. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +2 -0
  93. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +6 -7
  94. data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +1 -1
  95. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -1
  96. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +223 -0
  97. data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +11 -9
  98. data/lib/rails/generators/rails/app/templates/config/locales/en.yml +11 -13
  99. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +11 -19
  100. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +5 -1
  101. data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +6 -4
  102. data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +10 -0
  103. data/lib/rails/generators/rails/app/templates/dockerignore.tt +43 -0
  104. data/lib/rails/generators/rails/app/templates/gitignore.tt +4 -8
  105. data/lib/rails/generators/rails/app/templates/node-version.tt +1 -0
  106. data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +10 -8
  107. data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +9 -7
  108. data/lib/rails/generators/rails/application_record/application_record_generator.rb +4 -0
  109. data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +2 -1
  110. data/lib/rails/generators/rails/controller/USAGE +12 -4
  111. data/lib/rails/generators/rails/controller/controller_generator.rb +5 -0
  112. data/lib/rails/generators/rails/controller/templates/controller.rb.tt +1 -1
  113. data/lib/rails/generators/rails/credentials/credentials_generator.rb +29 -24
  114. data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +8 -0
  115. data/lib/rails/generators/rails/db/system/change/change_generator.rb +27 -0
  116. data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +1 -2
  117. data/lib/rails/generators/rails/migration/USAGE +21 -11
  118. data/lib/rails/generators/rails/model/model_generator.rb +4 -0
  119. data/lib/rails/generators/rails/plugin/USAGE +17 -6
  120. data/lib/rails/generators/rails/plugin/plugin_generator.rb +35 -13
  121. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +2 -2
  122. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +7 -20
  123. data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +1 -1
  124. data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +1 -15
  125. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +0 -2
  126. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +4 -4
  127. data/lib/rails/generators/rails/resource/resource_generator.rb +6 -0
  128. data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -1
  129. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -1
  130. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +2 -2
  131. data/lib/rails/generators/test_case.rb +2 -2
  132. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +1 -1
  133. data/lib/rails/generators/testing/{behaviour.rb → behavior.rb} +5 -2
  134. data/lib/rails/generators.rb +7 -9
  135. data/lib/rails/health_controller.rb +55 -0
  136. data/lib/rails/info.rb +1 -1
  137. data/lib/rails/info_controller.rb +31 -11
  138. data/lib/rails/mailers_controller.rb +15 -5
  139. data/lib/rails/paths.rb +14 -11
  140. data/lib/rails/rack/logger.rb +16 -14
  141. data/lib/rails/rackup/server.rb +15 -0
  142. data/lib/rails/railtie/configuration.rb +14 -1
  143. data/lib/rails/railtie.rb +27 -21
  144. data/lib/rails/ruby_version_check.rb +2 -0
  145. data/lib/rails/secrets.rb +10 -8
  146. data/lib/rails/source_annotation_extractor.rb +68 -19
  147. data/lib/rails/tasks/engine.rake +8 -8
  148. data/lib/rails/tasks/framework.rake +3 -5
  149. data/lib/rails/tasks/log.rake +1 -1
  150. data/lib/rails/tasks/misc.rake +3 -14
  151. data/lib/rails/tasks/statistics.rake +5 -4
  152. data/lib/rails/tasks/tmp.rake +5 -5
  153. data/lib/rails/tasks/zeitwerk.rake +1 -1
  154. data/lib/rails/tasks.rb +0 -2
  155. data/lib/rails/templates/rails/mailers/email.html.erb +25 -0
  156. data/lib/rails/templates/rails/mailers/index.html.erb +14 -7
  157. data/lib/rails/templates/rails/mailers/mailer.html.erb +11 -5
  158. data/lib/rails/templates/rails/welcome/index.html.erb +3 -1
  159. data/lib/rails/test_help.rb +13 -14
  160. data/lib/rails/test_unit/line_filtering.rb +1 -1
  161. data/lib/rails/test_unit/reporter.rb +6 -2
  162. data/lib/rails/test_unit/runner.rb +36 -18
  163. data/lib/rails/test_unit/test_parser.rb +88 -0
  164. data/lib/rails/test_unit/testing.rake +13 -33
  165. data/lib/rails/testing/maintain_test_schema.rb +16 -0
  166. data/lib/rails/version.rb +1 -1
  167. data/lib/rails.rb +22 -16
  168. metadata +68 -32
  169. data/RDOC_MAIN.rdoc +0 -97
  170. data/lib/rails/application/dummy_erb_compiler.rb +0 -18
  171. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt +0 -117
  172. data/lib/rails/generators/rails/model/USAGE +0 -113
  173. data/lib/rails/tasks/middleware.rake +0 -9
  174. data/lib/rails/tasks/restart.rake +0 -9
data/CHANGELOG.md CHANGED
@@ -1,216 +1,828 @@
1
- ## Rails 7.0.0 (December 15, 2021) ##
1
+ ## Rails 7.1.0 (October 05, 2023) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 7.0.0.rc3 (December 14, 2021) ##
6
+ ## Rails 7.1.0.rc2 (October 01, 2023) ##
7
7
 
8
- * Allow localhost with a port by default in development
8
+ * Always set the Rails logger to be an instance of `ActiveSupport::BroadcastLogger`.
9
9
 
10
- [Fixes: #43864]
10
+ *Edouard Chin*
11
11
 
12
- ## Rails 7.0.0.rc2 (December 14, 2021) ##
13
12
 
14
- * No changes
13
+ ## Rails 7.1.0.rc1 (September 27, 2023) ##
15
14
 
16
- ## Rails 7.0.0.rc1 (December 06, 2021) ##
15
+ * Require `concurrent-ruby` in `config/puma.rb` so that Puma can boot in
16
+ production when `WEB_CONCURRENCY` is not explicitly specified.
17
17
 
18
- * Remove deprecated `config` in `dbconsole`.
18
+ Fixes #49323.
19
19
 
20
- *Rafael Mendonça França*
20
+ *Matt Brictson*
21
21
 
22
- * Change default `X-XSS-Protection` header to disable XSS auditor
22
+ * Raise error when generating attribute with dangerous name.
23
23
 
24
- This header has been deprecated and the XSS auditor it triggered
25
- has been removed from all major modern browsers (in favour of
26
- Content Security Policy) that implemented this header to begin with
27
- (Firefox never did).
24
+ The following will now raise an error as `save` and `hash` are already
25
+ defined by Active Record.
28
26
 
29
- [OWASP](https://owasp.org/www-project-secure-headers/#x-xss-protection)
30
- suggests setting this header to '0' to disable the default behaviour
31
- on old browsers as it can introduce additional security issues.
27
+ ```bash
28
+ $ bin/rails generate model Post save
29
+ $ bin/rails generate model Post hash
30
+ ```
32
31
 
33
- Added the new behaviour as a framework default from Rails 7.0.
32
+ *Petrik de Heus*
34
33
 
35
- *Christian Sutter*
36
34
 
37
- * Scaffolds now use date_field, time_field and datetime_field instead of
38
- date_select, time_select and datetime_select; thus providing native date/time pickers.
35
+ ## Rails 7.1.0.beta1 (September 13, 2023) ##
39
36
 
40
- *Martijn Lafeber*
37
+ * Add ability to show slow tests to the test runner
41
38
 
42
- * Fix a regression in which autoload paths were initialized too late.
39
+ ```bash
40
+ $ bin/test --profile # additionally prints 10 (default) slowest tests
41
+ # or
42
+ $ bin/test --profile 20 # prints 20 slowest tests
43
+ ```
43
44
 
44
- *Xavier Noria*
45
+ *fatkodima*
45
46
 
46
- ## Rails 7.0.0.alpha2 (September 15, 2021) ##
47
+ * `rails new --javascript` generator now supports Bun
47
48
 
48
- * Fix activestorage dependency in the npm package.
49
+ ```bash
50
+ $ rails new my_new_app --javascript=bun
51
+ ```
49
52
 
50
- *Rafael Mendonça França*
53
+ *Jason Meller*
51
54
 
52
- ## Rails 7.0.0.alpha1 (September 15, 2021) ##
55
+ * bin/setup uses `bun` instead of `yarn` when generated an app with bun
53
56
 
54
- * New and upgraded Rails apps no longer generate `config/initializers/application_controller_renderer.rb`
55
- or `config/initializers/cookies_serializer.rb`
57
+ Use `bun install` on `bin/setup` when using `bun`.
56
58
 
57
- The default value for `cookies_serializer` (`:json`) has been moved to `config.load_defaults("7.0")`.
58
- The new framework defaults file can be used to upgrade the serializer.
59
+ *Cadu Ribeiro*
59
60
 
60
- *Alex Ghiculescu*
61
+ * `config/application.rb` now includes
61
62
 
62
- * New applications get a dependency on the new `debug` gem, replacing `byebug`.
63
+ ```ruby
64
+ config.autoload_lib(ignore: %w(assets tasks))
65
+ ```
66
+
67
+ In practice, this means that new 7.1 applications autoload from `lib` out of the box.
63
68
 
64
69
  *Xavier Noria*
65
70
 
66
- * Add SSL support for postgresql in `bin/rails dbconsole`.
71
+ * Add an option to start rails console in sandbox mode by default
72
+
73
+ `sandbox_by_default` option is added to start rails console in sandbox
74
+ mode by default. With this option turned on, `--no-sandbox` must be
75
+ specified to start rails in non-sandbox mode.
76
+
77
+ Note that this option is ignored when rails environment is development
78
+ or test.
79
+
80
+ *Shouichi Kamiya*
81
+
82
+ * Omit `webdrivers` gem dependency from `Gemfile` template
67
83
 
68
- Fixes #43114.
84
+ *Sean Doyle*
69
85
 
70
- *Michael Bayucot*
86
+ * Support filtering tests by line ranges
71
87
 
72
- * Add support for comments above gem declaration in Rails application templates, e.g. `gem("nokogiri", comment: "For XML")`.
88
+ The new syntax allows you to filter tests by line ranges. For example, the
89
+ following command runs tests from line 10 to 20.
73
90
 
74
- *Linas Juškevičius*
91
+ ```bash
92
+ $ rails test test/models/user_test.rb:10-20
93
+ ```
75
94
 
76
- * The setter `config.autoloader=` has been deleted. `zeitwerk` is the only
77
- available autoloading mode.
95
+ *Shouichi Kamiya*, *Seonggi Yang*, *oljfte*, *Ryohei UEDA*
96
+
97
+ * Update default scaffold templates to set 303 (See Other) as status code
98
+ on redirect for the update action for XHR requests other than GET or POST
99
+ to avoid issues (e.g browsers trying to follow the redirect using the
100
+ original request method resulting in double PATCH/PUT)
101
+
102
+ *Guillermo Iguaran*
103
+
104
+ * The new `config.autoload_lib_once` is similar to `config.autoload_lib`,
105
+ except that it adds `lib` to `config.autoload_once_paths` instead.
106
+
107
+ By calling `config.autoload_lib_once`, classes and modules in `lib` can be
108
+ autoloaded, even from application initializers, but won't be reloaded.
109
+
110
+ Please, see further details in the [autoloading
111
+ guide](https://guides.rubyonrails.org/v7.1/autoloading_and_reloading_constants.html).
78
112
 
79
113
  *Xavier Noria*
80
114
 
81
- * `config.autoload_once_paths` can be configured in the body of the
82
- application class defined in `config/application.rb` or in the configuration
83
- for environments in `config/environments/*`.
115
+ * Add `config.action_dispatch.debug_exception_log_level` to configure the log
116
+ level used by `ActionDispatch::DebugExceptions`.
117
+
118
+ The default is `:fatal`, but with `load_defaults "7.1"` the default will be
119
+ `:error`.
120
+
121
+ *Hartley McGuire*
122
+
123
+ * Add `DATABASE` option to `railties:install:migrations`
124
+
125
+ This allows you to specify which database the migrations should be copied to
126
+ when running `rails railties:install:migrations`.
127
+
128
+ ```bash
129
+ $ rails railties:install:migrations DATABASE=animals
130
+ ```
84
131
 
85
- Similarly, engines can configure that collection in the class body of the
86
- engine class or in the configuration for environments.
132
+ *Matthew Hirst*
87
133
 
88
- After that, the collection is frozen, and you can autoload from those paths.
89
- They are managed by the `Rails.autoloaders.once` autoloader, which does not
90
- reload, only autoloads/eager loads.
134
+ * The new method `config.autoload_lib(ignore:)` provides a simple way to
135
+ autoload from `lib`:
136
+
137
+ ```ruby
138
+ # config/application.rb
139
+ config.autoload_lib(ignore: %w(assets tasks))
140
+ ```
141
+
142
+ Please, see further details in the [autoloading
143
+ guide](https://guides.rubyonrails.org/v7.1/autoloading_and_reloading_constants.html).
91
144
 
92
145
  *Xavier Noria*
93
146
 
94
- * During initialization, you cannot autoload reloadable classes or modules
95
- like application models, unless they are wrapped in a `to_prepare` block.
96
- For example, from `config/initializers/*`, or in application, engines, or
97
- railties initializers.
147
+ * Don't show secret_key_base for `Rails.application.config#inspect`.
148
+
149
+ Before:
150
+
151
+ ```ruby
152
+ Rails.application.config.inspect
153
+ "#<Rails::Application::Configuration:0x00000001132b02a0 @root=... @secret_key_base=\"b3c631c314c0bbca50c1b2843150fe33\" ... >"
154
+ ```
155
+
156
+ After:
157
+
158
+ ```ruby
159
+ Rails.application.config.inspect
160
+ "#<Rails::Application::Configuration:0x00000001132b02a0>"
161
+ ```
162
+
163
+ *Petrik de Heus*
164
+
165
+ * Deprecate calling `Rails.application.secrets`.
166
+
167
+ Rails `secrets` have been deprecated in favor of `credentials`.
168
+ Calling `Rails.application.secrets` should show a deprecation warning.
98
169
 
99
- Please check the [autoloading
100
- guide](https://guides.rubyonrails.org/v7.0/autoloading_and_reloading_constants.html#autoloading-when-the-application-boots)
101
- for details.
170
+ *Petrik de Heus*
171
+
172
+ * Store `secret_key_base` in `Rails.config` for local environments.
173
+
174
+ Rails `secrets` have been deprecated in favor of `credentials`.
175
+ For the local environments the `secret_key_base` is now stored in
176
+ `Rails.config.secret_key_base` instead of the soft deprecated
177
+ `Rails.application.secrets.secret_key_base`.
178
+
179
+ *Petrik de Heus*
180
+
181
+ * Enable force_ssl=true in production by default: Force all access to the app over SSL,
182
+ use Strict-Transport-Security, and use secure cookies
183
+
184
+ *Justin Searls*, *Aaron Patterson*, *Guillermo Iguaran*, *Vinícius Bispo*
185
+
186
+ * Add engine's draw paths to application route set, so that the application
187
+ can draw route files defined in engine paths.
188
+
189
+ *Gannon McGibbon*
190
+
191
+ * Support `VISUAL` environment variable for commands which open an editor,
192
+ and prefer it over `EDITOR`.
193
+
194
+ *Summer ☀️*
195
+
196
+ * Add engine's `test/fixtures` path to `fixture_paths` in `on_load` hook if
197
+ path exists and is under the Rails application root.
198
+
199
+ *Chris Salzberg*
200
+
201
+ * `bin/rails app:template` now runs `bundle install` and any `after_bundle`
202
+ blocks after the template is executed.
203
+
204
+ *Jonathan Hefner* and *Gerry Caulfield*
205
+
206
+ * Enable passing column size to migration generator
207
+
208
+ Previously you could pass a limit to the migration generator:
209
+
210
+ `rails generate migration CreateAuthor name:text{65535}`
211
+
212
+ Now, a size attribute can be passed to the migration generator:
213
+
214
+ `rails generate migration CreateAuthor name:text{medium}`
215
+
216
+ This generates a migration which includes the size attribute:
217
+
218
+ ```ruby
219
+ class CreateAuthor < ActiveRecord::Migration[7.1]
220
+ def change
221
+ create_table :authors do |t|
222
+ t.text :name, size: :medium
223
+ end
224
+ end
225
+ end
226
+ ```
227
+
228
+ *Josh Broughton*, *Hartley McGuire*
229
+
230
+ * Trying to set a config key with the same name of a method now raises:
231
+
232
+ ```ruby
233
+ config.load_defaults = 7.0
234
+ # NoMethodError: Cannot assign to `load_defaults`, it is a configuration method
235
+ ```
102
236
 
103
237
  *Xavier Noria*
104
238
 
105
- * While they are allowed to have elements in common, it is no longer required
106
- that `config.autoload_once_paths` is a subset of `config.autoload_paths`.
107
- The former are managed by the `once` autoloader. The `main` autoloader
108
- manages the latter minus the former.
239
+ * Deprecate `secrets:edit/show` and remove `secrets:setup`
240
+
241
+ `bin/rails secrets:setup` has been deprecated since Rails 5.2 in favor of
242
+ credentials. This command has been removed.
243
+
244
+ `bin/rails secrets:show` and `bin/rails secrets:edit` have been deprecated
245
+ in favor of credentials.
246
+
247
+ Run `bin/rails credentials:help` for more information
248
+
249
+ *Petrik de Heus*
250
+
251
+ * `bin/rails --help` will now list only framework and plugin commands. Rake
252
+ tasks defined in `lib/tasks/*.rake` files will no longer be included. For a
253
+ list of those tasks, use `rake -T`.
254
+
255
+ *Jonathan Hefner*
256
+
257
+ * Allow calling `bin/rails restart` outside of app directory.
258
+
259
+ The following would previously fail with a "No Rakefile found" error.
260
+
261
+ ```bash
262
+ $ blog/bin/rails restart
263
+ ```
264
+
265
+ *Petrik de Heus*
266
+
267
+ * Support prerelease rubies in Gemfile template if RubyGems version is 3.3.13 or higher.
268
+
269
+ *Yasuo Honda*, *David Rodríguez*
270
+
271
+ * Autoloading setup honors root directories manually set by the user.
272
+
273
+ This is relevant for custom namespaces. For example, if you'd like classes
274
+ and modules under `app/services` to be defined in the `Services` namespace
275
+ without an extra `app/services/services` directory, this is now enough:
276
+
277
+ ```ruby
278
+ # config/initializers/autoloading.rb
279
+
280
+ # The namespace has to exist.
281
+ #
282
+ # In this example we define the module on the spot. Could also be created
283
+ # elsewhere and its definition loaded here with an ordinary `require`. In
284
+ # any case, `push_dir` expects a class or module object.
285
+ module Services; end
286
+
287
+ Rails.autoloaders.main.push_dir("#{Rails.root}/app/services", namespace: Services)
288
+ ```
289
+
290
+ Check the autoloading guide for further details.
109
291
 
110
292
  *Xavier Noria*
111
293
 
112
- * Show Rake task description if command is run with `-h`.
294
+ * Railties now requires the irb gem as a dependency, which means when you install Rails, irb will also
295
+ be installed as a gem. Rails will then use the installed version of irb for its console instead of
296
+ relying on Ruby's built-in version.
297
+ This ensures that Rails has access to the most up-to-date and reliable version of irb for its console.
298
+
299
+ *Stan Lo*
113
300
 
114
- Adding `-h` (or `--help`) to a Rails command that's a Rake task now outputs
115
- the task description instead of the general Rake help.
301
+ * Use infinitive form for all rails command descriptions verbs.
116
302
 
117
303
  *Petrik de Heus*
118
304
 
119
- * Add missing `plugin new` command to help.
305
+ * Credentials commands (e.g. `bin/rails credentials:edit`) now respect
306
+ `config.credentials.content_path` and `config.credentials.key_path` when set
307
+ in `config/application.rb` or `config/environments/#{Rails.env}.rb`.
308
+
309
+ Before:
120
310
 
121
- *Petrik de Heus
311
+ * `bin/rails credentials:edit` ignored `RAILS_ENV`, and would always edit
312
+ `config/credentials.yml.enc`.
122
313
 
123
- * Fix `config_for` error when there's only a shared root array.
314
+ * `bin/rails credentials:edit --environment foo` would create and edit
315
+ `config/credentials/foo.yml.enc`.
124
316
 
125
- *Loïc Delmaire*
317
+ * If `config.credentials.content_path` or `config.credentials.key_path`
318
+ was set, `bin/rails credentials:edit` could not be used to edit the
319
+ credentials. Editing credentials required using `bin/rails
320
+ encrypted:edit path/to/credentials --key path/to/key`.
126
321
 
127
- * Raise an error in generators if an index type is invalid.
322
+ After:
323
+
324
+ * `bin/rails credentials:edit` will edit the credentials file that the app
325
+ would load for the current `RAILS_ENV`.
326
+
327
+ * `bin/rails credentials:edit` respects `config.credentials.content_path`
328
+ and `config.credentials.key_path` when set in `config/application.rb`
329
+ or `config/environments/#{Rails.env}.rb`.
330
+
331
+ * `bin/rails credentials:edit --environment foo` will create and edit
332
+ `config/credentials/foo.yml.enc` _if_ `config.credentials.content_path`
333
+ has not been set for the `foo` environment. Ultimately, it will edit
334
+ the credentials file that the app would load for the `foo` environment.
335
+
336
+ *Jonathan Hefner*
337
+
338
+ * Add descriptions for non-Rake commands when running `rails -h`.
128
339
 
129
340
  *Petrik de Heus*
130
341
 
131
- * `package.json` now uses a strict version constraint for Rails JavaScript packages on new Rails apps.
342
+ * Show relevant commands when calling help
343
+
344
+ When running `rails -h` or just `rails` outside a Rails application,
345
+ Rails outputs all options for running the `rails new` command. This can be
346
+ confusing to users when they probably want to see the common Rails commands.
132
347
 
133
- *Zachary Scott*, *Alex Ghiculescu*
348
+ Instead, we should always show the common commands when running `rails -h`
349
+ inside or outside a Rails application.
134
350
 
135
- * Modified scaffold generator template so that running
136
- `rails g scaffold Author` no longer generates tests called "creating
137
- a Author", "updating a Author", and "destroying a Author".
351
+ As the relevant commands inside a Rails application differ from the
352
+ commands outside an application, the help USAGE file has been split to
353
+ show the most relevant commands for the context.
138
354
 
139
- Fixes #40744.
355
+ *Petrik de Heus*
140
356
 
141
- *Michael Duchemin*
357
+ * Add Rails::HealthController#show and map it to /up for newly generated applications.
358
+ Load balancers and uptime monitors all need a basic endpoint to tell whether the app is up.
359
+ This is a good starting point that'll work in many situations.
142
360
 
143
- * Raise an error in generators if a field type is invalid.
361
+ *DHH*
362
+
363
+ * Only use HostAuthorization middleware if `config.hosts` is not empty
364
+
365
+ *Hartley McGuire*
366
+
367
+ * Raise an exception when a `before_action`'s "only" or "except" filter
368
+ options reference an action that doesn't exist. This will be enabled by
369
+ default but can be overridden via config.
370
+
371
+ ```ruby
372
+ # config/environments/production.rb
373
+ config.action_controller.raise_on_missing_callback_actions = false
374
+ ```
375
+
376
+ *Jess Bees*
377
+
378
+ * Use physical processor count as the default Puma worker count in production.
379
+ This can be overridden by setting `ENV["WEB_CONCURRENCY"]` or editing the
380
+ generated "config/puma.rb" directly.
381
+
382
+ *DHH*
383
+
384
+ * Add Docker files by default to new apps: Dockerfile, .dockerignore, bin/docker-entrypoint.
385
+ These files can be skipped with `--skip-docker`. They're intended as a starting point for
386
+ a production deploy of the application. Not intended for development (see Docked Rails for that).
387
+
388
+ Example:
389
+
390
+ ```bash
391
+ $ docker build -t app .
392
+ $ docker volume create app-storage
393
+ $ docker run --rm -it -v app-storage:/rails/storage -p 3000:3000 --env RAILS_MASTER_KEY=<see config/master.key> app
394
+ ```
395
+
396
+ You can also start a console or a runner from this image:
397
+
398
+ ```bash
399
+ $ docker run --rm -it -v app-storage:/rails/storage --env RAILS_MASTER_KEY=<see config/master.key> app console
400
+ ```
401
+
402
+ To create a multi-platform image on Apple Silicon to deploy on AMD or Intel and push to Docker Hub for user/app:
403
+
404
+ ```bash
405
+ $ docker login -u <user>
406
+ $ docker buildx create --use
407
+ $ docker buildx build --push --platform=linux/amd64,linux/arm64 -t <user/image> .
408
+ ```
409
+
410
+ *DHH, Sam Ruby*
411
+
412
+ * Add ENV["SECRET_KEY_BASE_DUMMY"] for starting production environment with a generated secret base key,
413
+ which can be used to run tasks like `assets:precompile` without making the RAILS_MASTER_KEY available
414
+ to the build process.
415
+
416
+ Dockerfile layer example:
417
+
418
+ ```
419
+ RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile
420
+ ```
421
+
422
+ *DHH*
423
+
424
+ * Show descriptions for all commands in Rails help
425
+
426
+ When calling `rails help` most commands missed their description. We now
427
+ show the same descriptions as shown in `rails -T`.
144
428
 
145
429
  *Petrik de Heus*
146
430
 
147
- * `bin/rails tmp:clear` deletes also files and directories in `tmp/storage`.
431
+ * Always generate the storage/ directory with rails new to ensure there's a stable place to
432
+ put permanent files, and a single mount point for containers to map. Then default sqlite3 databases
433
+ to live there instead of db/, which is only meant for configuration, not data.
148
434
 
149
- *George Claghorn*
435
+ *DHH*
150
436
 
151
- * Fix compatibility with `psych >= 4`.
437
+ * Rails console now disables `IRB`'s autocompletion feature in production by default.
152
438
 
153
- Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
154
- `Rails.application.config_for` now uses `YAML.unsafe_load` if available.
439
+ Setting `IRB_USE_AUTOCOMPLETE=true` can override this default.
155
440
 
156
- *Jean Boussier*
441
+ *Stan Lo*
442
+
443
+ * Add `config.precompile_filter_parameters`, which enables precompilation of
444
+ `config.filter_parameters` using `ActiveSupport::ParameterFilter.precompile_filters`.
445
+ Precompilation can improve filtering performance, depending on the quantity
446
+ and types of filters.
447
+
448
+ `config.precompile_filter_parameters` defaults to `true` for
449
+ `config.load_defaults 7.1` and above.
450
+
451
+ *Jonathan Hefner*
452
+
453
+ * Add `after_routes_loaded` hook to `Rails::Railtie::Configuration` for
454
+ engines to add a hook to be called after application routes have been
455
+ loaded.
157
456
 
158
- * Allow loading nested locales in engines.
457
+ ```ruby
458
+ MyEngine.config.after_routes_loaded do
459
+ # code that must happen after routes have been loaded
460
+ end
461
+ ```
462
+
463
+ *Chris Salzberg*
464
+
465
+ * Send 303 See Other status code back for the destroy action on newly generated
466
+ scaffold controllers.
467
+
468
+ *Tony Drake*
469
+
470
+ * Add `Rails.application.deprecators` as a central point to manage deprecators
471
+ for an application.
472
+
473
+ Individual deprecators can be added and retrieved from the collection:
474
+
475
+ ```ruby
476
+ Rails.application.deprecators[:my_gem] = ActiveSupport::Deprecation.new("2.0", "MyGem")
477
+ Rails.application.deprecators[:other_gem] = ActiveSupport::Deprecation.new("3.0", "OtherGem")
478
+ ```
479
+
480
+ And the collection's configuration methods affect all deprecators in the
481
+ collection:
482
+
483
+ ```ruby
484
+ Rails.application.deprecators.debug = true
485
+
486
+ Rails.application.deprecators[:my_gem].debug
487
+ # => true
488
+ Rails.application.deprecators[:other_gem].debug
489
+ # => true
490
+ ```
491
+
492
+ Additionally, all deprecators in the collection can be silenced for the
493
+ duration of a given block:
494
+
495
+ ```ruby
496
+ Rails.application.deprecators.silence do
497
+ Rails.application.deprecators[:my_gem].warn # => silenced (no warning)
498
+ Rails.application.deprecators[:other_gem].warn # => silenced (no warning)
499
+ end
500
+ ```
501
+
502
+ *Jonathan Hefner*
503
+
504
+ * Move dbconsole logic to Active Record connection adapter.
505
+
506
+ Instead of hosting the connection logic in the command object, the
507
+ database adapter should be responsible for connecting to a console session.
508
+ This patch moves #find_cmd_and_exec to the adapter and exposes a new API to
509
+ lookup the adapter class without instantiating it.
510
+
511
+ *Gannon McGibbon*, *Paarth Madan*
512
+
513
+ * Add `Rails.application.message_verifiers` as a central point to configure
514
+ and create message verifiers for an application.
515
+
516
+ This allows applications to, for example, rotate old `secret_key_base`
517
+ values:
518
+
519
+ ```ruby
520
+ config.before_initialize do |app|
521
+ app.message_verifiers.rotate(secret_key_base: "old secret_key_base")
522
+ end
523
+ ```
524
+
525
+ And for libraries to create preconfigured message verifiers:
526
+
527
+ ```ruby
528
+ ActiveStorage.verifier = Rails.application.message_verifiers["ActiveStorage"]
529
+ ```
530
+
531
+ *Jonathan Hefner*
532
+
533
+ * Support MySQL's ssl-mode option for the dbconsole command.
534
+
535
+ Verifying the identity of the database server requires setting the ssl-mode
536
+ option to VERIFY_CA or VERIFY_IDENTITY. This option was previously ignored
537
+ for the dbconsole command.
538
+
539
+ *Petrik de Heus*
540
+
541
+ * Delegate application record generator description to orm hooked generator.
159
542
 
160
543
  *Gannon McGibbon*
161
544
 
162
- * Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
545
+ * Show BCC recipients when present in Action Mailer previews.
546
+
547
+ *Akshay Birajdar*
548
+
549
+ * Extend `routes --grep` to also filter routes by matching against path.
550
+
551
+ Example:
552
+
553
+ ```bash
554
+ $ bin/rails routes --grep /cats/1
555
+ Prefix Verb URI Pattern Controller#Action
556
+ cat GET /cats/:id(.:format) cats#show
557
+ PATCH /cats/:id(.:format) cats#update
558
+ PUT /cats/:id(.:format) cats#update
559
+ DELETE /cats/:id(.:format) cats#destroy
560
+ ```
561
+
562
+ *Orhan Toy*
563
+
564
+ * Improve `rails runner` output when given a file path that doesn't exist.
565
+
566
+ *Tekin Suleyman*
567
+
568
+ * `config.allow_concurrency = false` now use a `Monitor` instead of a `Mutex`
569
+
570
+ This allows to enable `config.active_support.executor_around_test_case` even
571
+ when `config.allow_concurrency` is disabled.
163
572
 
164
573
  *Jean Boussier*
165
574
 
166
- * Remove `Rack::Runtime` from the default middleware stack and deprecate
167
- referencing it in middleware operations without adding it back.
575
+ * Add `routes --unused` option to detect extraneous routes.
168
576
 
169
- *Hartley McGuire*
577
+ Example:
170
578
 
171
- * Allow adding additional authorized hosts in development via `ENV['RAILS_DEVELOPMENT_HOSTS']`.
579
+ ```bash
580
+ $ bin/rails routes --unused
172
581
 
173
- *Josh Abernathy*, *Debbie Milburn*
582
+ Found 2 unused routes:
174
583
 
175
- * Add app concern and test keepfiles to generated engine plugins.
584
+ Prefix Verb URI Pattern Controller#Action
585
+ one GET /one(.:format) action#one
586
+ two GET /two(.:format) action#two
587
+ ```
176
588
 
177
589
  *Gannon McGibbon*
178
590
 
179
- * Stop generating a license for in-app plugins.
591
+ * Add `--parent` option to controller generator to specify parent class of job.
592
+
593
+ Example:
594
+
595
+ `bin/rails g controller admin/users --parent=admin_controller` generates:
596
+
597
+ ```ruby
598
+ class Admin::UsersController < AdminController
599
+ # ...
600
+ end
601
+ ```
180
602
 
181
603
  *Gannon McGibbon*
182
604
 
183
- * `rails app:update` no longer prompts you to overwrite files that are generally modified in the
184
- course of developing a Rails app. See [#41083](https://github.com/rails/rails/pull/41083) for
185
- the full list of changes.
605
+ * In-app custom credentials templates are now supported. When a credentials
606
+ file does not exist, `rails credentials:edit` will now try to use
607
+ `lib/templates/rails/credentials/credentials.yml.tt` to generate the
608
+ credentials file, before falling back to the default template.
186
609
 
187
- *Alex Ghiculescu*
610
+ This allows e.g. an open-source Rails app (which would not include encrypted
611
+ credentials files in its repo) to include a credentials template, so that
612
+ users who install the app will get a custom pre-filled credentials file when
613
+ they run `rails credentials:edit`.
188
614
 
189
- * Change default branch for new Rails projects and plugins to `main`.
615
+ *Jonathan Hefner*
190
616
 
191
- *Prateek Choudhary*
617
+ * Except for `dev` and `test` environments, newly generated per-environment
618
+ credentials files (e.g. `config/credentials/production.yml.enc`) now include
619
+ a `secret_key_base` for convenience, just as `config/credentials.yml.enc`
620
+ does.
192
621
 
193
- * The new method `Rails.benchmark` gives you a quick way to measure and log the execution time taken by a block:
622
+ *Jonathan Hefner*
194
623
 
195
- def test_expensive_stuff
196
- Rails.benchmark("test_expensive_stuff") { ... }
197
- end
624
+ * `--no-*` options now work with the app generator's `--minimal` option, and
625
+ are both comprehensive and precise. For example:
626
+
627
+ ```bash
628
+ $ rails new my_cool_app --minimal
629
+ Based on the specified options, the following options will also be activated:
630
+
631
+ --skip-active-job [due to --minimal]
632
+ --skip-action-mailer [due to --skip-active-job, --minimal]
633
+ --skip-active-storage [due to --skip-active-job, --minimal]
634
+ --skip-action-mailbox [due to --skip-active-storage, --minimal]
635
+ --skip-action-text [due to --skip-active-storage, --minimal]
636
+ --skip-javascript [due to --minimal]
637
+ --skip-hotwire [due to --skip-javascript, --minimal]
638
+ --skip-action-cable [due to --minimal]
639
+ --skip-bootsnap [due to --minimal]
640
+ --skip-dev-gems [due to --minimal]
641
+ --skip-system-test [due to --minimal]
642
+
643
+ ...
644
+
645
+ $ rails new my_cool_app --minimal --no-skip-active-storage
646
+ Based on the specified options, the following options will also be activated:
647
+
648
+ --skip-action-mailer [due to --minimal]
649
+ --skip-action-mailbox [due to --minimal]
650
+ --skip-action-text [due to --minimal]
651
+ --skip-javascript [due to --minimal]
652
+ --skip-hotwire [due to --skip-javascript, --minimal]
653
+ --skip-action-cable [due to --minimal]
654
+ --skip-bootsnap [due to --minimal]
655
+ --skip-dev-gems [due to --minimal]
656
+ --skip-system-test [due to --minimal]
657
+
658
+ ...
659
+ ```
660
+
661
+ *Brad Trick* and *Jonathan Hefner*
662
+
663
+ * Add `--skip-dev-gems` option to app generator to skip adding development
664
+ gems (like `web-console`) to the Gemfile.
665
+
666
+ *Brad Trick*
667
+
668
+ * Skip Active Storage and Action Mailer if Active Job is skipped.
669
+
670
+ *Étienne Barrié*
671
+
672
+ * Correctly check if frameworks are disabled when running app:update.
673
+
674
+ *Étienne Barrié* and *Paulo Barros*
675
+
676
+ * Delegate model generator description to orm hooked generator.
677
+
678
+ *Gannon McGibbon*
198
679
 
199
- This functionality was available in some contexts only before.
680
+ * Execute `rails runner` scripts inside the executor.
200
681
 
201
- *Simon Perepelitsa*
682
+ Enables error reporting, query cache, etc.
202
683
 
203
- * Applications generated with `--skip-sprockets` no longer get `app/assets/config/manifest.js` and `app/assets/stylesheets/application.css`.
684
+ *Jean Boussier*
204
685
 
205
- *Cindy Gao*
686
+ * Avoid booting in development then test for test tasks.
206
687
 
207
- * Add support for stylesheets and ERB views to `rails stats`.
688
+ Running one of the rails test subtasks (e.g. test:system, test:models) would
689
+ go through Rake and cause the app to be booted twice. Now all the test:*
690
+ subtasks are defined as Thor tasks and directly load the test environment.
208
691
 
209
- *Joel Hawksley*
692
+ *Étienne Barrié*
210
693
 
211
- * Allow appended root routes to take precedence over internal welcome controller.
694
+ * Deprecate `Rails::Generators::Testing::Behaviour` in favor of `Rails::Generators::Testing::Behavior`.
212
695
 
213
696
  *Gannon McGibbon*
214
697
 
698
+ * Allow configuration of logger size for local and test environments
699
+
700
+ `config.log_file_size`
701
+
702
+ Defaults to `100` megabytes.
703
+
704
+ *Bernie Chiu*
705
+
706
+ * Enroll new apps in decrypted diffs of credentials by default. This behavior
707
+ can be opted out of with the app generator's `--skip-decrypted-diffs` flag.
708
+
709
+ *Jonathan Hefner*
710
+
711
+ * Support declarative-style test name filters with `bin/rails test`.
712
+
713
+ This makes it possible to run a declarative-style test such as:
714
+
715
+ ```ruby
716
+ class MyTest < ActiveSupport::TestCase
717
+ test "does something" do
718
+ # ...
719
+ end
720
+ end
721
+ ```
722
+
723
+ Using its declared name:
724
+
725
+ ```bash
726
+ $ bin/rails test test/my_test.rb -n "does something"
727
+ ```
728
+
729
+ Instead of having to specify its expanded method name:
730
+
731
+ ```bash
732
+ $ bin/rails test test/my_test.rb -n test_does_something
733
+ ```
734
+
735
+ *Jonathan Hefner*
736
+
737
+ * Add `--js` and `--skip-javascript` options to `rails new`
738
+
739
+ `--js` alias to `rails new --javascript ...`
740
+
741
+ Same as `-j`, e.g. `rails new --js esbuild ...`
742
+
743
+ `--skip-js` alias to `rails new --skip-javascript ...`
744
+
745
+ Same as `-J`, e.g. `rails new --skip-js ...`
746
+
747
+ *Dorian Marié*
748
+
749
+ * Allow relative paths with leading dot slash to be passed to `rails test`.
750
+
751
+ Fix `rails test ./test/model/post_test.rb` to run a single test file.
752
+
753
+ *Shouichi Kamiya* and *oljfte*
754
+
755
+ * Deprecate `config.enable_dependency_loading`. This flag addressed a limitation of the `classic` autoloader and has no effect nowadays. To fix this deprecation, please just delete the reference.
756
+
757
+ *Xavier Noria*
758
+
759
+ * Define `config.enable_reloading` to be `!config.cache_classes` for a more intuitive name. While `config.enable_reloading` and `config.reloading_enabled?` are preferred from now on, `config.cache_classes` is supported for backwards compatibility.
760
+
761
+ *Xavier Noria*
762
+
763
+ * Add JavaScript dependencies installation on bin/setup
764
+
765
+ Add `yarn install` to bin/setup when using esbuild, webpack, or rollout.
766
+
767
+ *Carlos Ribeiro*
768
+
769
+ * Use `controller_class_path` in `Rails::Generators::NamedBase#route_url`
770
+
771
+ The `route_url` method now returns the correct path when generating
772
+ a namespaced controller with a top-level model using `--model-name`.
773
+
774
+ Previously, when running this command:
775
+
776
+ ```bash
777
+ $ bin/rails generate scaffold_controller Admin/Post --model-name Post
778
+ ```
779
+
780
+ the comments above the controller action would look like:
781
+
782
+ ``` ruby
783
+ # GET /posts
784
+ def index
785
+ @posts = Post.all
786
+ end
787
+ ```
788
+
789
+ afterwards, they now look like this:
790
+
791
+ ``` ruby
792
+ # GET /admin/posts
793
+ def index
794
+ @posts = Post.all
795
+ end
796
+ ```
797
+
798
+ Fixes #44662.
799
+
800
+ *Andrew White*
801
+
802
+ * No longer add autoloaded paths to `$LOAD_PATH`.
803
+
804
+ This means it won't be possible to load them with a manual `require` call, the class or module can be referenced instead.
805
+
806
+ Reducing the size of `$LOAD_PATH` speed-up `require` calls for apps not using `bootsnap`, and reduce the
807
+ size of the `bootsnap` cache for the others.
808
+
809
+ *Jean Boussier*
810
+
811
+ * Remove default `X-Download-Options` header
812
+
813
+ This header is currently only used by Internet Explorer which
814
+ will be discontinued in 2022 and since Rails 7 does not fully
815
+ support Internet Explorer this header should not be a default one.
816
+
817
+ *Harun Sabljaković*
818
+
819
+ * Add .node-version files for Rails apps that use Node.js
820
+
821
+ Node version managers that make use of this file:
822
+ https://github.com/shadowspawn/node-version-usage#node-version-file-usage
823
+
824
+ The generated Dockerfile will use the same node version.
825
+
826
+ *Sam Ruby*
215
827
 
216
- Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/railties/CHANGELOG.md) for previous changes.
828
+ Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/railties/CHANGELOG.md) for previous changes.