railties 7.1.4 → 7.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +174 -781
  3. data/lib/minitest/rails_plugin.rb +5 -2
  4. data/lib/rails/all.rb +1 -3
  5. data/lib/rails/api/task.rb +3 -2
  6. data/lib/rails/application/bootstrap.rb +5 -6
  7. data/lib/rails/application/configuration.rb +31 -36
  8. data/lib/rails/application/dummy_config.rb +2 -2
  9. data/lib/rails/application/finisher.rb +7 -0
  10. data/lib/rails/application.rb +13 -57
  11. data/lib/rails/backtrace_cleaner.rb +14 -1
  12. data/lib/rails/cli.rb +0 -1
  13. data/lib/rails/command.rb +1 -1
  14. data/lib/rails/commands/app/update_command.rb +86 -0
  15. data/lib/rails/commands/console/console_command.rb +2 -21
  16. data/lib/rails/commands/console/irb_console.rb +137 -0
  17. data/lib/rails/commands/credentials/credentials_command.rb +2 -2
  18. data/lib/rails/commands/dbconsole/dbconsole_command.rb +21 -30
  19. data/lib/rails/commands/devcontainer/devcontainer_command.rb +34 -0
  20. data/lib/rails/commands/rake/rake_command.rb +1 -1
  21. data/lib/rails/commands/runner/runner_command.rb +14 -3
  22. data/lib/rails/commands/server/server_command.rb +5 -3
  23. data/lib/rails/commands/test/test_command.rb +2 -0
  24. data/lib/rails/configuration.rb +10 -1
  25. data/lib/rails/console/app.rb +5 -32
  26. data/lib/rails/console/helpers.rb +5 -16
  27. data/lib/rails/console/methods.rb +23 -0
  28. data/lib/rails/engine.rb +5 -5
  29. data/lib/rails/gem_version.rb +3 -3
  30. data/lib/rails/generators/app_base.rb +70 -49
  31. data/lib/rails/generators/base.rb +5 -1
  32. data/lib/rails/generators/database.rb +227 -69
  33. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +2 -0
  34. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +2 -0
  35. data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +2 -0
  36. data/lib/rails/generators/generated_attribute.rb +26 -1
  37. data/lib/rails/generators/rails/app/app_generator.rb +52 -23
  38. data/lib/rails/generators/rails/app/templates/Dockerfile.tt +23 -14
  39. data/lib/rails/generators/rails/app/templates/Gemfile.tt +16 -16
  40. data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +4 -0
  41. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +8 -1
  42. data/lib/rails/generators/rails/app/templates/app/views/pwa/manifest.json.erb.tt +22 -0
  43. data/lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js +26 -0
  44. data/lib/rails/generators/rails/app/templates/bin/brakeman.tt +6 -0
  45. data/lib/rails/generators/rails/app/templates/bin/rubocop.tt +7 -0
  46. data/lib/rails/generators/rails/app/templates/bin/setup.tt +6 -2
  47. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +1 -1
  48. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +3 -3
  49. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +7 -0
  50. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +8 -1
  51. data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +3 -3
  52. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +11 -6
  53. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +2 -0
  54. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +6 -5
  55. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +1 -1
  56. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +70 -0
  57. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +39 -29
  58. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +4 -0
  59. data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +5 -0
  60. data/lib/rails/generators/rails/app/templates/dockerignore.tt +13 -0
  61. data/lib/rails/generators/rails/app/templates/github/ci.yml.tt +138 -0
  62. data/lib/rails/generators/rails/app/templates/github/dependabot.yml +12 -0
  63. data/lib/rails/generators/rails/app/templates/gitignore.tt +3 -3
  64. data/lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html +66 -0
  65. data/lib/rails/generators/rails/app/templates/public/icon.png +0 -0
  66. data/lib/rails/generators/rails/app/templates/public/icon.svg +3 -0
  67. data/lib/rails/generators/rails/app/templates/rubocop.yml.tt +8 -0
  68. data/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt +1 -1
  69. data/lib/rails/generators/rails/controller/controller_generator.rb +1 -1
  70. data/lib/rails/generators/rails/db/system/change/change_generator.rb +131 -20
  71. data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +166 -0
  72. data/lib/rails/generators/rails/migration/migration_generator.rb +4 -0
  73. data/lib/rails/generators/rails/plugin/plugin_generator.rb +38 -7
  74. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +2 -2
  75. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +5 -1
  76. data/lib/rails/generators/rails/plugin/templates/bin/rubocop.tt +7 -0
  77. data/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +103 -0
  78. data/lib/rails/generators/rails/plugin/templates/github/dependabot.yml +12 -0
  79. data/lib/rails/generators/rails/plugin/templates/rubocop.yml.tt +8 -0
  80. data/lib/rails/generators/rails/plugin/templates/test/application_system_test_case.rb.tt +1 -1
  81. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +10 -0
  82. data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +2 -0
  83. data/lib/rails/generators/test_unit/system/templates/application_system_test_case.rb.tt +1 -1
  84. data/lib/rails/generators/testing/assertions.rb +20 -0
  85. data/lib/rails/generators/testing/behavior.rb +7 -6
  86. data/lib/rails/generators.rb +1 -1
  87. data/lib/rails/health_controller.rb +1 -1
  88. data/lib/rails/info.rb +2 -2
  89. data/lib/rails/mailers_controller.rb +14 -1
  90. data/lib/rails/paths.rb +2 -2
  91. data/lib/rails/pwa_controller.rb +15 -0
  92. data/lib/rails/rack/logger.rb +15 -7
  93. data/lib/rails/railtie/configurable.rb +2 -2
  94. data/lib/rails/railtie.rb +2 -3
  95. data/lib/rails/tasks/framework.rake +0 -26
  96. data/lib/rails/tasks/tmp.rake +1 -1
  97. data/lib/rails/templates/layouts/application.html.erb +1 -1
  98. data/lib/rails/templates/rails/mailers/email.html.erb +12 -8
  99. data/lib/rails/templates/rails/welcome/index.html.erb +3 -2
  100. data/lib/rails/test_help.rb +2 -4
  101. data/lib/rails/test_unit/reporter.rb +8 -2
  102. data/lib/rails/test_unit/runner.rb +21 -2
  103. data/lib/rails/test_unit/test_parser.rb +45 -0
  104. data/lib/rails.rb +6 -3
  105. metadata +38 -32
  106. data/lib/rails/app_updater.rb +0 -52
  107. data/lib/rails/commands/secrets/USAGE +0 -61
  108. data/lib/rails/commands/secrets/secrets_command.rb +0 -47
  109. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +0 -68
  110. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +0 -54
  111. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +0 -70
  112. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +0 -24
  113. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +0 -62
  114. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +0 -53
  115. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +0 -280
  116. data/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png +0 -0
  117. data/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png +0 -0
  118. data/lib/rails/generators/rails/app/templates/public/favicon.ico +0 -0
  119. data/lib/rails/ruby_version_check.rb +0 -17
  120. data/lib/rails/secrets.rb +0 -110
data/CHANGELOG.md CHANGED
@@ -1,931 +1,324 @@
1
- ## Rails 7.1.4 (August 22, 2024) ##
1
+ ## Rails 7.2.0.beta1 (May 29, 2024) ##
2
2
 
3
- * Preserve `--asset-pipeline propshaft` when running `app:update`.
3
+ * Create a Dev Container Generator that generates a Dev Container setup based on the current configuration
4
+ of the application. Usage:
4
5
 
5
- *Zacharias Knudsen*
6
+ `bin/rails devcontainer`
6
7
 
7
- * Allow string keys for SQLCommenter.
8
+ *Andrew Novoselac*
8
9
 
9
- *Ngan Pham*
10
+ * Add Rubocop and GitHub Actions to plugin generator.
11
+ This can be skipped using --skip-rubocop and --skip-ci.
10
12
 
11
- * Fix derived foreign key to return correctly when association id is part of query constraints.
13
+ *Chris Oliver*
12
14
 
13
- *Varun Sharma*
15
+ * Remove support for `oracle`, `sqlserver` and JRuby specific database adapters from the
16
+ `rails new` and `rails db:system:change` commands.
14
17
 
15
- * Show warning for `secret_key_base` in development too.
18
+ The supported options are `sqlite3`, `mysql`, `postgresql` and `trilogy`.
16
19
 
17
- *fatkodima*
20
+ *Andrew Novoselac*
18
21
 
19
- * Fix sanitizer vendor configuration in 7.1 defaults.
20
-
21
- In apps where `rails-html-sanitizer` was not eagerly loaded, the sanitizer default could end up
22
- being Rails::HTML4::Sanitizer when it should be set to `Rails::HTML5::Sanitizer`.
23
-
24
- *Mike Dalessio*, *Rafael Mendonça França*
25
-
26
- * Revert the use of `Concurrent.physical_processor_count` in default Puma config
27
-
28
- While for many people this saves one config to set, for many others using
29
- a shared hosting solution, this cause the default configuration to spawn
30
- way more workers than reasonable.
31
-
32
- There is unfortunately no reliable way to detect how many cores an application
33
- can realistically use, and even then, assuming the application should use
34
- all the machine resources is often wrong.
35
-
36
- *Jean Boussier*
22
+ * Add options to `bin/rails app:update`.
37
23
 
24
+ `bin/rails app:update` now supports the same generic options that generators do:
38
25
 
39
- ## Rails 7.1.3.4 (June 04, 2024) ##
40
-
41
- * No changes.
42
-
43
-
44
- ## Rails 7.1.3.3 (May 16, 2024) ##
45
-
46
- * No changes.
47
-
48
-
49
- ## Rails 7.1.3.2 (February 21, 2024) ##
50
-
51
- * No changes.
26
+ * `--force`: Accept all changes to existing files
27
+ * `--skip`: Refuse all changes to existing files
28
+ * `--pretend`: Don't make any changes
29
+ * `--quiet`: Don't output all changes made
52
30
 
31
+ *Étienne Barrié*
53
32
 
54
- ## Rails 7.1.3.1 (February 21, 2024) ##
33
+ * Implement Rails console commands and helpers with IRB v1.13's extension APIs.
55
34
 
56
- * No changes.
35
+ Rails console users will now see `helper`, `controller`, `new_session`, and `app` under
36
+ IRB help message's `Helper methods` category. And `reload!` command will be displayed under
37
+ the new `Rails console` commands category.
57
38
 
39
+ Prior to this change, Rails console's commands and helper methods are added through IRB's
40
+ private components and don't show up in its help message, which led to poor discoverability.
58
41
 
59
- ## Rails 7.1.3 (January 16, 2024) ##
42
+ *Stan Lo*
60
43
 
61
- * Make sure `config.after_routes_loaded` hook runs on boot.
44
+ * Remove deprecated `Rails::Generators::Testing::Behaviour`.
62
45
 
63
46
  *Rafael Mendonça França*
64
47
 
65
- * Fix `config.log_level` not being respected when using a `BroadcastLogger`
66
-
67
- *Édouard Chin*
68
-
69
- * Fix isolated engines to take `ActiveRecord::Base.table_name_prefix` into consideration.
70
- This will allow for engine defined models, such as inside Active Storage, to respect
71
- Active Record table name prefix configuration.
72
-
73
- *Chedli Bourguiba*
74
-
75
- * The `bin/rails app:template` command will no longer add potentially unwanted
76
- gem platforms via `bundle lock --add-platform=...` commands.
77
-
78
- *Jonathan Hefner*
79
-
80
-
81
- ## Rails 7.1.2 (November 10, 2023) ##
82
-
83
- * Fix running `db:system:change` when app has no Dockerfile.
84
-
85
- *Hartley McGuire*
86
-
87
- * If you accessed `config.eager_load_paths` and friends, later changes to
88
- `config.paths` were not reflected in the expected auto/eager load paths.
89
- Now, they are.
90
-
91
- This bug has been latent since Rails 3.
92
-
93
- Fixes #49629.
94
-
95
- *Xavier Noria*
96
-
97
- ## Rails 7.1.1 (October 11, 2023) ##
98
-
99
- * Ensures the Rails generated Dockerfile uses correct ruby version and matches Gemfile.
100
-
101
- *Abhay Nikam*
102
-
103
-
104
- ## Rails 7.1.0 (October 05, 2023) ##
105
-
106
- * No changes.
107
-
108
-
109
- ## Rails 7.1.0.rc2 (October 01, 2023) ##
110
-
111
- * Always set the Rails logger to be an instance of `ActiveSupport::BroadcastLogger`.
112
-
113
- *Edouard Chin*
114
-
115
-
116
- ## Rails 7.1.0.rc1 (September 27, 2023) ##
117
-
118
- * Require `concurrent-ruby` in `config/puma.rb` so that Puma can boot in
119
- production when `WEB_CONCURRENCY` is not explicitly specified.
120
-
121
- Fixes #49323.
122
-
123
- *Matt Brictson*
124
-
125
- * Raise error when generating attribute with dangerous name.
126
-
127
- The following will now raise an error as `save` and `hash` are already
128
- defined by Active Record.
129
-
130
- ```bash
131
- $ bin/rails generate model Post save
132
- $ bin/rails generate model Post hash
133
- ```
134
-
135
- *Petrik de Heus*
136
-
137
-
138
- ## Rails 7.1.0.beta1 (September 13, 2023) ##
139
-
140
- * Add ability to show slow tests to the test runner
141
-
142
- ```bash
143
- $ bin/test --profile # additionally prints 10 (default) slowest tests
144
- # or
145
- $ bin/test --profile 20 # prints 20 slowest tests
146
- ```
147
-
148
- *fatkodima*
149
-
150
- * `rails new --javascript` generator now supports Bun
151
-
152
- ```bash
153
- $ rails new my_new_app --javascript=bun
154
- ```
155
-
156
- *Jason Meller*
157
-
158
- * bin/setup uses `bun` instead of `yarn` when generated an app with bun
159
-
160
- Use `bun install` on `bin/setup` when using `bun`.
161
-
162
- *Cadu Ribeiro*
48
+ * Remove deprecated `find_cmd_and_exec` console helper.
163
49
 
164
- * `config/application.rb` now includes
165
-
166
- ```ruby
167
- config.autoload_lib(ignore: %w(assets tasks))
168
- ```
169
-
170
- In practice, this means that new 7.1 applications autoload from `lib` out of the box.
171
-
172
- *Xavier Noria*
173
-
174
- * Add an option to start rails console in sandbox mode by default
175
-
176
- `sandbox_by_default` option is added to start rails console in sandbox
177
- mode by default. With this option turned on, `--no-sandbox` must be
178
- specified to start rails in non-sandbox mode.
179
-
180
- Note that this option is ignored when rails environment is development
181
- or test.
182
-
183
- *Shouichi Kamiya*
184
-
185
- * Omit `webdrivers` gem dependency from `Gemfile` template
186
-
187
- *Sean Doyle*
188
-
189
- * Support filtering tests by line ranges
190
-
191
- The new syntax allows you to filter tests by line ranges. For example, the
192
- following command runs tests from line 10 to 20.
193
-
194
- ```bash
195
- $ rails test test/models/user_test.rb:10-20
196
- ```
197
-
198
- *Shouichi Kamiya*, *Seonggi Yang*, *oljfte*, *Ryohei UEDA*
199
-
200
- * Update default scaffold templates to set 303 (See Other) as status code
201
- on redirect for the update action for XHR requests other than GET or POST
202
- to avoid issues (e.g browsers trying to follow the redirect using the
203
- original request method resulting in double PATCH/PUT)
50
+ *Rafael Mendonça França*
204
51
 
205
- *Guillermo Iguaran*
52
+ * Remove deprecated `Rails.config.enable_dependency_loading`.
206
53
 
207
- * The new `config.autoload_lib_once` is similar to `config.autoload_lib`,
208
- except that it adds `lib` to `config.autoload_once_paths` instead.
54
+ *Rafael Mendonça França*
209
55
 
210
- By calling `config.autoload_lib_once`, classes and modules in `lib` can be
211
- autoloaded, even from application initializers, but won't be reloaded.
56
+ * Remove deprecated `Rails.application.secrets`.
212
57
 
213
- Please, see further details in the [autoloading
214
- guide](https://guides.rubyonrails.org/v7.1/autoloading_and_reloading_constants.html).
58
+ *Rafael Mendonça França*
215
59
 
216
- *Xavier Noria*
60
+ * Generated Gemfile will include `require: "debug/prelude"` for the `debug` gem.
217
61
 
218
- * Add `config.action_dispatch.debug_exception_log_level` to configure the log
219
- level used by `ActionDispatch::DebugExceptions`.
62
+ Requiring `debug` gem directly automatically activates it, which could introduce
63
+ additional overhead and memory usage even without entering a debugging session.
220
64
 
221
- The default is `:fatal`, but with `load_defaults "7.1"` the default will be
222
- `:error`.
65
+ By making Bundler require `debug/prelude` instead, developers can keep their access
66
+ to breakpoint methods like `debugger` or `binding.break`, but the debugger won't be
67
+ activated until a breakpoint is hit.
223
68
 
224
- *Hartley McGuire*
69
+ *Stan Lo*
225
70
 
226
- * Add `DATABASE` option to `railties:install:migrations`
71
+ * Skip generating a `test` job in ci.yml when a new application is generated with the
72
+ `--skip-test` option.
227
73
 
228
- This allows you to specify which database the migrations should be copied to
229
- when running `rails railties:install:migrations`.
74
+ *Steve Polito*
230
75
 
231
- ```bash
232
- $ rails railties:install:migrations DATABASE=animals
233
- ```
76
+ * Update the `.node-version` file conditionally generated for new applications to 20.11.1
234
77
 
235
- *Matthew Hirst*
78
+ *Steve Polito*
236
79
 
237
- * The new method `config.autoload_lib(ignore:)` provides a simple way to
238
- autoload from `lib`:
80
+ * Fix sanitizer vendor configuration in 7.1 defaults.
239
81
 
240
- ```ruby
241
- # config/application.rb
242
- config.autoload_lib(ignore: %w(assets tasks))
243
- ```
82
+ In apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up
83
+ being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer.
244
84
 
245
- Please, see further details in the [autoloading
246
- guide](https://guides.rubyonrails.org/v7.1/autoloading_and_reloading_constants.html).
85
+ *Mike Dalessio*, *Rafael Mendonça França*
247
86
 
248
- *Xavier Noria*
87
+ * Set `action_mailer.default_url_options` values in `development` and `test`.
249
88
 
250
- * Don't show secret_key_base for `Rails.application.config#inspect`.
89
+ Prior to this commit, new Rails applications would raise `ActionView::Template::Error`
90
+ if a mailer included a url built with a `*_path` helper.
251
91
 
252
- Before:
92
+ *Steve Polito*
253
93
 
254
- ```ruby
255
- Rails.application.config.inspect
256
- "#<Rails::Application::Configuration:0x00000001132b02a0 @root=... @secret_key_base=\"b3c631c314c0bbca50c1b2843150fe33\" ... >"
257
- ```
94
+ * Introduce `Rails::Generators::Testing::Assertions#assert_initializer`.
258
95
 
259
- After:
96
+ Compliments the existing `initializer` generator action.
260
97
 
261
- ```ruby
262
- Rails.application.config.inspect
263
- "#<Rails::Application::Configuration:0x00000001132b02a0>"
98
+ ```rb
99
+ assert_initializer "mail_interceptors.rb"
264
100
  ```
265
101
 
266
- *Petrik de Heus*
267
-
268
- * Deprecate calling `Rails.application.secrets`.
269
-
270
- Rails `secrets` have been deprecated in favor of `credentials`.
271
- Calling `Rails.application.secrets` should show a deprecation warning.
272
-
273
- *Petrik de Heus*
274
-
275
- * Store `secret_key_base` in `Rails.config` for local environments.
102
+ *Steve Polito*
276
103
 
277
- Rails `secrets` have been deprecated in favor of `credentials`.
278
- For the local environments the `secret_key_base` is now stored in
279
- `Rails.config.secret_key_base` instead of the soft deprecated
280
- `Rails.application.secrets.secret_key_base`.
104
+ * Generate a .devcontainer folder and its contents when creating a new app.
281
105
 
282
- *Petrik de Heus*
106
+ The .devcontainer folder includes everything needed to boot the app and do development in a remote container.
283
107
 
284
- * Enable force_ssl=true in production by default: Force all access to the app over SSL,
285
- use Strict-Transport-Security, and use secure cookies
108
+ The container setup includes:
109
+ - A redis container for Kredis, ActionCable etc.
110
+ - A database (SQLite, Postgres, MySQL or MariaDB)
111
+ - A Headless chrome container for system tests
112
+ - Active Storage configured to use the local disk and with preview features working
286
113
 
287
- *Justin Searls*, *Aaron Patterson*, *Guillermo Iguaran*, *Vinícius Bispo*
114
+ If any of these options are skipped in the app setup they will not be included in the container configuration.
288
115
 
289
- * Add engine's draw paths to application route set, so that the application
290
- can draw route files defined in engine paths.
116
+ These files can be skipped using the `--skip-devcontainer` option.
291
117
 
292
- *Gannon McGibbon*
118
+ *Andrew Novoselac & Rafael Mendonça França*
293
119
 
294
- * Support `VISUAL` environment variable for commands which open an editor,
295
- and prefer it over `EDITOR`.
120
+ * Introduce `SystemTestCase#served_by` for configuring the System Test application server.
296
121
 
297
- *Summer ☀️*
298
-
299
- * Add engine's `test/fixtures` path to `fixture_paths` in `on_load` hook if
300
- path exists and is under the Rails application root.
301
-
302
- *Chris Salzberg*
303
-
304
- * `bin/rails app:template` now runs `bundle install` and any `after_bundle`
305
- blocks after the template is executed.
306
-
307
- *Jonathan Hefner* and *Gerry Caulfield*
308
-
309
- * Enable passing column size to migration generator
310
-
311
- Previously you could pass a limit to the migration generator:
312
-
313
- `rails generate migration CreateAuthor name:text{65535}`
314
-
315
- Now, a size attribute can be passed to the migration generator:
316
-
317
- `rails generate migration CreateAuthor name:text{medium}`
318
-
319
- This generates a migration which includes the size attribute:
122
+ By default this is localhost. This method allows the host and port to be specified manually.
320
123
 
321
124
  ```ruby
322
- class CreateAuthor < ActiveRecord::Migration[7.1]
323
- def change
324
- create_table :authors do |t|
325
- t.text :name, size: :medium
326
- end
327
- end
125
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
126
+ served_by host: "testserver", port: 45678
328
127
  end
329
128
  ```
330
129
 
331
- *Josh Broughton*, *Hartley McGuire*
332
-
333
- * Trying to set a config key with the same name of a method now raises:
334
-
335
- ```ruby
336
- config.load_defaults = 7.0
337
- # NoMethodError: Cannot assign to `load_defaults`, it is a configuration method
338
- ```
339
-
340
- *Xavier Noria*
341
-
342
- * Deprecate `secrets:edit/show` and remove `secrets:setup`
343
-
344
- `bin/rails secrets:setup` has been deprecated since Rails 5.2 in favor of
345
- credentials. This command has been removed.
346
-
347
- `bin/rails secrets:show` and `bin/rails secrets:edit` have been deprecated
348
- in favor of credentials.
130
+ *Andrew Novoselac & Rafael Mendonça França*
349
131
 
350
- Run `bin/rails credentials:help` for more information
132
+ * `bin/rails test` will no longer load files named `*_test.rb` if they are located in the `fixtures` folder.
351
133
 
352
- *Petrik de Heus*
353
-
354
- * `bin/rails --help` will now list only framework and plugin commands. Rake
355
- tasks defined in `lib/tasks/*.rake` files will no longer be included. For a
356
- list of those tasks, use `rake -T`.
134
+ *Edouard Chin*
357
135
 
358
- *Jonathan Hefner*
136
+ * Ensure logger tags configured with `config.log_tags` are still active in `request.action_dispatch` handlers.
359
137
 
360
- * Allow calling `bin/rails restart` outside of app directory.
138
+ *KJ Tsanaktsidis*
361
139
 
362
- The following would previously fail with a "No Rakefile found" error.
140
+ * Setup jemalloc in the default Dockerfile for memory optimization.
363
141
 
364
- ```bash
365
- $ blog/bin/rails restart
366
- ```
142
+ *Matt Almeida*, *Jean Boussier*
367
143
 
368
- *Petrik de Heus*
144
+ * Commented out lines in .railsrc file should not be treated as arguments when using
145
+ rails new generator command. Update ARGVScrubber to ignore text after `#` symbols.
369
146
 
370
- * Support prerelease rubies in Gemfile template if RubyGems version is 3.3.13 or higher.
147
+ *Willian Tenfen*
371
148
 
372
- *Yasuo Honda*, *David Rodríguez*
149
+ * Skip CSS when generating APIs.
373
150
 
374
- * Autoloading setup honors root directories manually set by the user.
151
+ *Ruy Rocha*
375
152
 
376
- This is relevant for custom namespaces. For example, if you'd like classes
377
- and modules under `app/services` to be defined in the `Services` namespace
378
- without an extra `app/services/services` directory, this is now enough:
379
-
380
- ```ruby
381
- # config/initializers/autoloading.rb
153
+ * Rails console now indicates application name and the current Rails environment:
382
154
 
383
- # The namespace has to exist.
384
- #
385
- # In this example we define the module on the spot. Could also be created
386
- # elsewhere and its definition loaded here with an ordinary `require`. In
387
- # any case, `push_dir` expects a class or module object.
388
- module Services; end
389
-
390
- Rails.autoloaders.main.push_dir("#{Rails.root}/app/services", namespace: Services)
155
+ ```txt
156
+ my-app(dev)> # for RAILS_ENV=development
157
+ my-app(test)> # for RAILS_ENV=test
158
+ my-app(prod)> # for RAILS_ENV=production
159
+ my-app(my_env)> # for RAILS_ENV=my_env
391
160
  ```
392
161
 
393
- Check the autoloading guide for further details.
394
-
395
- *Xavier Noria*
162
+ The application name is derived from the application's module name from `config/application.rb`.
163
+ For example, `MyApp` will displayed as `my-app` in the prompt.
396
164
 
397
- * Railties now requires the irb gem as a dependency, which means when you install Rails, irb will also
398
- be installed as a gem. Rails will then use the installed version of irb for its console instead of
399
- relying on Ruby's built-in version.
400
- This ensures that Rails has access to the most up-to-date and reliable version of irb for its console.
165
+ Additionally, the environment name will be colorized when the environment is
166
+ `development` (blue), `test` (blue), or `production` (red), if your
167
+ terminal supports it.
401
168
 
402
169
  *Stan Lo*
403
170
 
404
- * Use infinitive form for all rails command descriptions verbs.
405
-
406
- *Petrik de Heus*
407
-
408
- * Credentials commands (e.g. `bin/rails credentials:edit`) now respect
409
- `config.credentials.content_path` and `config.credentials.key_path` when set
410
- in `config/application.rb` or `config/environments/#{Rails.env}.rb`.
171
+ * Ensure `autoload_paths`, `autoload_once_paths`, `eager_load_paths`, and
172
+ `load_paths` only have directories when initialized from engine defaults.
411
173
 
412
- Before:
174
+ Previously, files under the `app` directory could end up there too.
413
175
 
414
- * `bin/rails credentials:edit` ignored `RAILS_ENV`, and would always edit
415
- `config/credentials.yml.enc`.
176
+ *Takumasa Ochi*
416
177
 
417
- * `bin/rails credentials:edit --environment foo` would create and edit
418
- `config/credentials/foo.yml.enc`.
178
+ * Prevent unnecessary application reloads in development.
419
179
 
420
- * If `config.credentials.content_path` or `config.credentials.key_path`
421
- was set, `bin/rails credentials:edit` could not be used to edit the
422
- credentials. Editing credentials required using `bin/rails
423
- encrypted:edit path/to/credentials --key path/to/key`.
180
+ Previously, some files outside autoload paths triggered unnecessary reloads.
181
+ With this fix, application reloads according to `Rails.autoloaders.main.dirs`,
182
+ thereby preventing unnecessary reloads.
424
183
 
425
- After:
184
+ *Takumasa Ochi*
426
185
 
427
- * `bin/rails credentials:edit` will edit the credentials file that the app
428
- would load for the current `RAILS_ENV`.
186
+ * Use `oven-sh/setup-bun` in GitHub CI when generating an app with Bun.
429
187
 
430
- * `bin/rails credentials:edit` respects `config.credentials.content_path`
431
- and `config.credentials.key_path` when set in `config/application.rb`
432
- or `config/environments/#{Rails.env}.rb`.
188
+ *TangRufus*
433
189
 
434
- * `bin/rails credentials:edit --environment foo` will create and edit
435
- `config/credentials/foo.yml.enc` _if_ `config.credentials.content_path`
436
- has not been set for the `foo` environment. Ultimately, it will edit
437
- the credentials file that the app would load for the `foo` environment.
190
+ * Disable `pidfile` generation in the `production` environment.
438
191
 
439
- *Jonathan Hefner*
192
+ *Hans Schnedlitz*
440
193
 
441
- * Add descriptions for non-Rake commands when running `rails -h`.
194
+ * Set `config.action_view.annotate_rendered_view_with_filenames` to `true` in
195
+ the `development` environment.
442
196
 
443
- *Petrik de Heus*
197
+ *Adrian Marin*
444
198
 
445
- * Show relevant commands when calling help
199
+ * Support the `BACKTRACE` environment variable to turn off backtrace cleaning.
446
200
 
447
- When running `rails -h` or just `rails` outside a Rails application,
448
- Rails outputs all options for running the `rails new` command. This can be
449
- confusing to users when they probably want to see the common Rails commands.
201
+ Useful for debugging framework code:
450
202
 
451
- Instead, we should always show the common commands when running `rails -h`
452
- inside or outside a Rails application.
453
-
454
- As the relevant commands inside a Rails application differ from the
455
- commands outside an application, the help USAGE file has been split to
456
- show the most relevant commands for the context.
457
-
458
- *Petrik de Heus*
459
-
460
- * Add Rails::HealthController#show and map it to /up for newly generated applications.
461
- Load balancers and uptime monitors all need a basic endpoint to tell whether the app is up.
462
- This is a good starting point that'll work in many situations.
463
-
464
- *DHH*
465
-
466
- * Only use HostAuthorization middleware if `config.hosts` is not empty
203
+ ```sh
204
+ BACKTRACE=1 bin/rails server
205
+ ```
467
206
 
468
- *Hartley McGuire*
207
+ *Alex Ghiculescu*
469
208
 
470
- * Raise an exception when a `before_action`'s "only" or "except" filter
471
- options reference an action that doesn't exist. This will be enabled by
472
- default but can be overridden via config.
209
+ * Raise `ArgumentError` when reading `config.x.something` with arguments:
473
210
 
474
211
  ```ruby
475
- # config/environments/production.rb
476
- config.action_controller.raise_on_missing_callback_actions = false
212
+ config.x.this_works.this_raises true # raises ArgumentError
477
213
  ```
478
214
 
479
- *Jess Bees*
215
+ *Sean Doyle*
480
216
 
481
- * Use physical processor count as the default Puma worker count in production.
482
- This can be overridden by setting `ENV["WEB_CONCURRENCY"]` or editing the
483
- generated "config/puma.rb" directly.
217
+ * Add default PWA files for manifest and service-worker that are served from `app/views/pwa` and can be dynamically rendered through ERB. Mount these files explicitly at the root with default routes in the generated routes file.
484
218
 
485
219
  *DHH*
486
220
 
487
- * Add Docker files by default to new apps: Dockerfile, .dockerignore, bin/docker-entrypoint.
488
- These files can be skipped with `--skip-docker`. They're intended as a starting point for
489
- a production deploy of the application. Not intended for development (see Docked Rails for that).
490
-
491
- Example:
492
-
493
- ```bash
494
- $ docker build -t app .
495
- $ docker volume create app-storage
496
- $ docker run --rm -it -v app-storage:/rails/storage -p 3000:3000 --env RAILS_MASTER_KEY=<see config/master.key> app
497
- ```
498
-
499
- You can also start a console or a runner from this image:
500
-
501
- ```bash
502
- $ docker run --rm -it -v app-storage:/rails/storage --env RAILS_MASTER_KEY=<see config/master.key> app console
503
- ```
504
-
505
- To create a multi-platform image on Apple Silicon to deploy on AMD or Intel and push to Docker Hub for user/app:
506
-
507
- ```bash
508
- $ docker login -u <user>
509
- $ docker buildx create --use
510
- $ docker buildx build --push --platform=linux/amd64,linux/arm64 -t <user/image> .
511
- ```
512
-
513
- *DHH, Sam Ruby*
514
-
515
- * Add ENV["SECRET_KEY_BASE_DUMMY"] for starting production environment with a generated secret base key,
516
- which can be used to run tasks like `assets:precompile` without making the RAILS_MASTER_KEY available
517
- to the build process.
518
-
519
- Dockerfile layer example:
520
-
521
- ```
522
- RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile
523
- ```
221
+ * Updated system tests to now use headless Chrome by default for the new applications.
524
222
 
525
223
  *DHH*
526
224
 
527
- * Show descriptions for all commands in Rails help
528
-
529
- When calling `rails help` most commands missed their description. We now
530
- show the same descriptions as shown in `rails -T`.
531
-
532
- *Petrik de Heus*
533
-
534
- * Always generate the storage/ directory with rails new to ensure there's a stable place to
535
- put permanent files, and a single mount point for containers to map. Then default sqlite3 databases
536
- to live there instead of db/, which is only meant for configuration, not data.
225
+ * Add GitHub CI files for Dependabot, Brakeman, RuboCop, and running tests by default. Can be skipped with `--skip-ci`.
537
226
 
538
227
  *DHH*
539
228
 
540
- * Rails console now disables `IRB`'s autocompletion feature in production by default.
541
-
542
- Setting `IRB_USE_AUTOCOMPLETE=true` can override this default.
543
-
544
- *Stan Lo*
545
-
546
- * Add `config.precompile_filter_parameters`, which enables precompilation of
547
- `config.filter_parameters` using `ActiveSupport::ParameterFilter.precompile_filters`.
548
- Precompilation can improve filtering performance, depending on the quantity
549
- and types of filters.
550
-
551
- `config.precompile_filter_parameters` defaults to `true` for
552
- `config.load_defaults 7.1` and above.
553
-
554
- *Jonathan Hefner*
555
-
556
- * Add `after_routes_loaded` hook to `Rails::Railtie::Configuration` for
557
- engines to add a hook to be called after application routes have been
558
- loaded.
559
-
560
- ```ruby
561
- MyEngine.config.after_routes_loaded do
562
- # code that must happen after routes have been loaded
563
- end
564
- ```
565
-
566
- *Chris Salzberg*
567
-
568
- * Send 303 See Other status code back for the destroy action on newly generated
569
- scaffold controllers.
570
-
571
- *Tony Drake*
572
-
573
- * Add `Rails.application.deprecators` as a central point to manage deprecators
574
- for an application.
575
-
576
- Individual deprecators can be added and retrieved from the collection:
577
-
578
- ```ruby
579
- Rails.application.deprecators[:my_gem] = ActiveSupport::Deprecation.new("2.0", "MyGem")
580
- Rails.application.deprecators[:other_gem] = ActiveSupport::Deprecation.new("3.0", "OtherGem")
581
- ```
582
-
583
- And the collection's configuration methods affect all deprecators in the
584
- collection:
585
-
586
- ```ruby
587
- Rails.application.deprecators.debug = true
588
-
589
- Rails.application.deprecators[:my_gem].debug
590
- # => true
591
- Rails.application.deprecators[:other_gem].debug
592
- # => true
593
- ```
594
-
595
- Additionally, all deprecators in the collection can be silenced for the
596
- duration of a given block:
597
-
598
- ```ruby
599
- Rails.application.deprecators.silence do
600
- Rails.application.deprecators[:my_gem].warn # => silenced (no warning)
601
- Rails.application.deprecators[:other_gem].warn # => silenced (no warning)
602
- end
603
- ```
604
-
605
- *Jonathan Hefner*
606
-
607
- * Move dbconsole logic to Active Record connection adapter.
608
-
609
- Instead of hosting the connection logic in the command object, the
610
- database adapter should be responsible for connecting to a console session.
611
- This patch moves #find_cmd_and_exec to the adapter and exposes a new API to
612
- lookup the adapter class without instantiating it.
613
-
614
- *Gannon McGibbon*, *Paarth Madan*
615
-
616
- * Add `Rails.application.message_verifiers` as a central point to configure
617
- and create message verifiers for an application.
618
-
619
- This allows applications to, for example, rotate old `secret_key_base`
620
- values:
621
-
622
- ```ruby
623
- config.before_initialize do |app|
624
- app.message_verifiers.rotate(secret_key_base: "old secret_key_base")
625
- end
626
- ```
627
-
628
- And for libraries to create preconfigured message verifiers:
629
-
630
- ```ruby
631
- ActiveStorage.verifier = Rails.application.message_verifiers["ActiveStorage"]
632
- ```
633
-
634
- *Jonathan Hefner*
635
-
636
- * Support MySQL's ssl-mode option for the dbconsole command.
637
-
638
- Verifying the identity of the database server requires setting the ssl-mode
639
- option to VERIFY_CA or VERIFY_IDENTITY. This option was previously ignored
640
- for the dbconsole command.
641
-
642
- *Petrik de Heus*
643
-
644
- * Delegate application record generator description to orm hooked generator.
645
-
646
- *Gannon McGibbon*
647
-
648
- * Show BCC recipients when present in Action Mailer previews.
649
-
650
- *Akshay Birajdar*
229
+ * Add Brakeman by default for static analysis of security vulnerabilities. Allow skipping with `--skip-brakeman option`.
651
230
 
652
- * Extend `routes --grep` to also filter routes by matching against path.
231
+ *vipulnsward*
653
232
 
654
- Example:
233
+ * Add RuboCop with rules from `rubocop-rails-omakase` by default. Skip with `--skip-rubocop`.
655
234
 
656
- ```bash
657
- $ bin/rails routes --grep /cats/1
658
- Prefix Verb URI Pattern Controller#Action
659
- cat GET /cats/:id(.:format) cats#show
660
- PATCH /cats/:id(.:format) cats#update
661
- PUT /cats/:id(.:format) cats#update
662
- DELETE /cats/:id(.:format) cats#destroy
663
- ```
664
-
665
- *Orhan Toy*
666
-
667
- * Improve `rails runner` output when given a file path that doesn't exist.
668
-
669
- *Tekin Suleyman*
670
-
671
- * `config.allow_concurrency = false` now use a `Monitor` instead of a `Mutex`
672
-
673
- This allows to enable `config.active_support.executor_around_test_case` even
674
- when `config.allow_concurrency` is disabled.
675
-
676
- *Jean Boussier*
677
-
678
- * Add `routes --unused` option to detect extraneous routes.
235
+ *DHH* and *zzak*
679
236
 
680
- Example:
237
+ * Use `bin/rails runner --skip-executor` to not wrap the runner script with an
238
+ Executor.
681
239
 
682
- ```bash
683
- $ bin/rails routes --unused
240
+ *Ben Sheldon*
684
241
 
685
- Found 2 unused routes:
686
-
687
- Prefix Verb URI Pattern Controller#Action
688
- one GET /one(.:format) action#one
689
- two GET /two(.:format) action#two
690
- ```
691
-
692
- *Gannon McGibbon*
693
-
694
- * Add `--parent` option to controller generator to specify parent class of job.
695
-
696
- Example:
242
+ * Fix isolated engines to take `ActiveRecord::Base.table_name_prefix` into consideration.
697
243
 
698
- `bin/rails g controller admin/users --parent=admin_controller` generates:
244
+ This will allow for engine defined models, such as inside Active Storage, to respect
245
+ Active Record table name prefix configuration.
699
246
 
700
- ```ruby
701
- class Admin::UsersController < AdminController
702
- # ...
703
- end
704
- ```
247
+ *Chedli Bourguiba*
705
248
 
706
- *Gannon McGibbon*
707
-
708
- * In-app custom credentials templates are now supported. When a credentials
709
- file does not exist, `rails credentials:edit` will now try to use
710
- `lib/templates/rails/credentials/credentials.yml.tt` to generate the
711
- credentials file, before falling back to the default template.
712
-
713
- This allows e.g. an open-source Rails app (which would not include encrypted
714
- credentials files in its repo) to include a credentials template, so that
715
- users who install the app will get a custom pre-filled credentials file when
716
- they run `rails credentials:edit`.
717
-
718
- *Jonathan Hefner*
719
-
720
- * Except for `dev` and `test` environments, newly generated per-environment
721
- credentials files (e.g. `config/credentials/production.yml.enc`) now include
722
- a `secret_key_base` for convenience, just as `config/credentials.yml.enc`
723
- does.
724
-
725
- *Jonathan Hefner*
726
-
727
- * `--no-*` options now work with the app generator's `--minimal` option, and
728
- are both comprehensive and precise. For example:
729
-
730
- ```bash
731
- $ rails new my_cool_app --minimal
732
- Based on the specified options, the following options will also be activated:
733
-
734
- --skip-active-job [due to --minimal]
735
- --skip-action-mailer [due to --skip-active-job, --minimal]
736
- --skip-active-storage [due to --skip-active-job, --minimal]
737
- --skip-action-mailbox [due to --skip-active-storage, --minimal]
738
- --skip-action-text [due to --skip-active-storage, --minimal]
739
- --skip-javascript [due to --minimal]
740
- --skip-hotwire [due to --skip-javascript, --minimal]
741
- --skip-action-cable [due to --minimal]
742
- --skip-bootsnap [due to --minimal]
743
- --skip-dev-gems [due to --minimal]
744
- --skip-system-test [due to --minimal]
745
-
746
- ...
747
-
748
- $ rails new my_cool_app --minimal --no-skip-active-storage
749
- Based on the specified options, the following options will also be activated:
750
-
751
- --skip-action-mailer [due to --minimal]
752
- --skip-action-mailbox [due to --minimal]
753
- --skip-action-text [due to --minimal]
754
- --skip-javascript [due to --minimal]
755
- --skip-hotwire [due to --skip-javascript, --minimal]
756
- --skip-action-cable [due to --minimal]
757
- --skip-bootsnap [due to --minimal]
758
- --skip-dev-gems [due to --minimal]
759
- --skip-system-test [due to --minimal]
760
-
761
- ...
762
- ```
249
+ * Fix running `db:system:change` when the app has no Dockerfile.
763
250
 
764
- *Brad Trick* and *Jonathan Hefner*
251
+ *Hartley McGuire*
765
252
 
766
- * Add `--skip-dev-gems` option to app generator to skip adding development
767
- gems (like `web-console`) to the Gemfile.
253
+ * In Action Mailer previews, list inline attachments separately from normal
254
+ attachments.
768
255
 
769
- *Brad Trick*
256
+ For example, attachments that were previously listed like
770
257
 
771
- * Skip Active Storage and Action Mailer if Active Job is skipped.
258
+ > Attachments: logo.png file1.pdf file2.pdf
772
259
 
773
- *Étienne Barrié*
260
+ will now be listed like
774
261
 
775
- * Correctly check if frameworks are disabled when running app:update.
262
+ > Attachments: file1.pdf file2.pdf (Inline: logo.png)
776
263
 
777
- *Étienne Barrié* and *Paulo Barros*
264
+ *Christian Schmidt* and *Jonathan Hefner*
778
265
 
779
- * Delegate model generator description to orm hooked generator.
266
+ * In mailer preview, only show SMTP-To if it differs from the union of To, Cc and Bcc.
780
267
 
781
- *Gannon McGibbon*
268
+ *Christian Schmidt*
782
269
 
783
- * Execute `rails runner` scripts inside the executor.
270
+ * Enable YJIT by default on new applications running Ruby 3.3+.
784
271
 
785
- Enables error reporting, query cache, etc.
272
+ Adds a `config/initializers/enable_yjit.rb` initializer that enables YJIT
273
+ when running on Ruby 3.3+.
786
274
 
787
275
  *Jean Boussier*
788
276
 
789
- * Avoid booting in development then test for test tasks.
790
-
791
- Running one of the rails test subtasks (e.g. test:system, test:models) would
792
- go through Rake and cause the app to be booted twice. Now all the test:*
793
- subtasks are defined as Thor tasks and directly load the test environment.
794
-
795
- *Étienne Barrié*
277
+ * In Action Mailer previews, show date from message `Date` header if present.
796
278
 
797
- * Deprecate `Rails::Generators::Testing::Behaviour` in favor of `Rails::Generators::Testing::Behavior`.
279
+ *Sampat Badhe*
798
280
 
799
- *Gannon McGibbon*
281
+ * Exit with non-zero status when the migration generator fails.
800
282
 
801
- * Allow configuration of logger size for local and test environments
283
+ *Katsuhiko YOSHIDA*
802
284
 
803
- `config.log_file_size`
804
-
805
- Defaults to `100` megabytes.
806
-
807
- *Bernie Chiu*
808
-
809
- * Enroll new apps in decrypted diffs of credentials by default. This behavior
810
- can be opted out of with the app generator's `--skip-decrypted-diffs` flag.
811
-
812
- *Jonathan Hefner*
813
-
814
- * Support declarative-style test name filters with `bin/rails test`.
815
-
816
- This makes it possible to run a declarative-style test such as:
817
-
818
- ```ruby
819
- class MyTest < ActiveSupport::TestCase
820
- test "does something" do
821
- # ...
822
- end
823
- end
824
- ```
285
+ * Use numeric UID and GID in Dockerfile template.
825
286
 
826
- Using its declared name:
287
+ The Dockerfile generated by `rails new` sets the default user and group
288
+ by name instead of UID:GID. This can cause the following error in Kubernetes:
827
289
 
828
- ```bash
829
- $ bin/rails test test/my_test.rb -n "does something"
830
290
  ```
831
-
832
- Instead of having to specify its expanded method name:
833
-
834
- ```bash
835
- $ bin/rails test test/my_test.rb -n test_does_something
291
+ container has runAsNonRoot and image has non-numeric user (rails), cannot verify user is non-root
836
292
  ```
837
293
 
838
- *Jonathan Hefner*
839
-
840
- * Add `--js` and `--skip-javascript` options to `rails new`
841
-
842
- `--js` alias to `rails new --javascript ...`
843
-
844
- Same as `-j`, e.g. `rails new --js esbuild ...`
845
-
846
- `--skip-js` alias to `rails new --skip-javascript ...`
847
-
848
- Same as `-J`, e.g. `rails new --skip-js ...`
294
+ This change sets default user and group by their numeric values.
849
295
 
850
- *Dorian Marié*
296
+ *Ivan Fedotov*
851
297
 
852
- * Allow relative paths with leading dot slash to be passed to `rails test`.
298
+ * Disallow invalid values for rails new options.
853
299
 
854
- Fix `rails test ./test/model/post_test.rb` to run a single test file.
300
+ The `--database`, `--asset-pipeline`, `--css`, and `--javascript` options
301
+ for `rails new` take different arguments. This change validates them.
855
302
 
856
- *Shouichi Kamiya* and *oljfte*
303
+ *Tony Drake*, *Akhil G Krishnan*, *Petrik de Heus*
857
304
 
858
- * 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.
305
+ * Conditionally print `$stdout` when invoking `run_generator`.
859
306
 
860
- *Xavier Noria*
307
+ In an effort to improve the developer experience when debugging
308
+ generator tests, we add the ability to conditionally print `$stdout`
309
+ instead of capturing it.
861
310
 
862
- * 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.
311
+ This allows for calls to `binding.irb` and `puts` work as expected.
863
312
 
864
- *Xavier Noria*
865
-
866
- * Add JavaScript dependencies installation on bin/setup
867
-
868
- Add `yarn install` to bin/setup when using esbuild, webpack, or rollout.
869
-
870
- *Carlos Ribeiro*
871
-
872
- * Use `controller_class_path` in `Rails::Generators::NamedBase#route_url`
873
-
874
- The `route_url` method now returns the correct path when generating
875
- a namespaced controller with a top-level model using `--model-name`.
876
-
877
- Previously, when running this command:
878
-
879
- ```bash
880
- $ bin/rails generate scaffold_controller Admin/Post --model-name Post
313
+ ```sh
314
+ RAILS_LOG_TO_STDOUT=true ./bin/test test/generators/actions_test.rb
881
315
  ```
882
316
 
883
- the comments above the controller action would look like:
884
-
885
- ``` ruby
886
- # GET /posts
887
- def index
888
- @posts = Post.all
889
- end
890
- ```
891
-
892
- afterwards, they now look like this:
893
-
894
- ``` ruby
895
- # GET /admin/posts
896
- def index
897
- @posts = Post.all
898
- end
899
- ```
900
-
901
- Fixes #44662.
902
-
903
- *Andrew White*
904
-
905
- * No longer add autoloaded paths to `$LOAD_PATH`.
906
-
907
- This means it won't be possible to load them with a manual `require` call, the class or module can be referenced instead.
908
-
909
- Reducing the size of `$LOAD_PATH` speed-up `require` calls for apps not using `bootsnap`, and reduce the
910
- size of the `bootsnap` cache for the others.
911
-
912
- *Jean Boussier*
913
-
914
- * Remove default `X-Download-Options` header
915
-
916
- This header is currently only used by Internet Explorer which
917
- will be discontinued in 2022 and since Rails 7 does not fully
918
- support Internet Explorer this header should not be a default one.
919
-
920
- *Harun Sabljaković*
921
-
922
- * Add .node-version files for Rails apps that use Node.js
923
-
924
- Node version managers that make use of this file:
925
- https://github.com/shadowspawn/node-version-usage#node-version-file-usage
317
+ *Steve Polito*
926
318
 
927
- The generated Dockerfile will use the same node version.
319
+ * Remove the option `config.public_file_server.enabled` from the generators
320
+ for all environments, as the value is the same in all environments.
928
321
 
929
- *Sam Ruby*
322
+ *Adrian Hirt*
930
323
 
931
- Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/railties/CHANGELOG.md) for previous changes.
324
+ Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/railties/CHANGELOG.md) for previous changes.