railties 7.2.3.1 → 8.1.4.1

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 (165) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +173 -254
  3. data/lib/minitest/rails_plugin.rb +56 -13
  4. data/lib/rails/application/bootstrap.rb +5 -1
  5. data/lib/rails/application/configuration.rb +40 -18
  6. data/lib/rails/application/default_middleware_stack.rb +5 -1
  7. data/lib/rails/application/finisher.rb +5 -5
  8. data/lib/rails/application/routes_reloader.rb +67 -14
  9. data/lib/rails/application.rb +6 -3
  10. data/lib/rails/application_controller.rb +2 -0
  11. data/lib/rails/backtrace_cleaner.rb +2 -2
  12. data/lib/rails/code_statistics.rb +131 -86
  13. data/lib/rails/code_statistics_calculator.rb +78 -76
  14. data/lib/rails/command/base.rb +0 -2
  15. data/lib/rails/command/environment_argument.rb +0 -1
  16. data/lib/rails/command/helpers/editor.rb +1 -1
  17. data/lib/rails/command.rb +1 -7
  18. data/lib/rails/commands/app/update_command.rb +6 -9
  19. data/lib/rails/commands/console/irb_console.rb +7 -10
  20. data/lib/rails/commands/credentials/USAGE +4 -4
  21. data/lib/rails/commands/credentials/credentials_command.rb +30 -6
  22. data/lib/rails/commands/dev/dev_command.rb +1 -1
  23. data/lib/rails/commands/devcontainer/devcontainer_command.rb +3 -1
  24. data/lib/rails/commands/encrypted/encrypted_command.rb +0 -1
  25. data/lib/rails/commands/plugin/plugin_command.rb +10 -1
  26. data/lib/rails/commands/stats/stats_command.rb +19 -0
  27. data/lib/rails/dev_caching.rb +2 -2
  28. data/lib/rails/engine/configuration.rb +3 -1
  29. data/lib/rails/engine/lazy_route_set.rb +163 -0
  30. data/lib/rails/engine.rb +11 -8
  31. data/lib/rails/gem_version.rb +3 -3
  32. data/lib/rails/generators/actions.rb +5 -6
  33. data/lib/rails/generators/app_base.rb +113 -69
  34. data/lib/rails/generators/base.rb +0 -4
  35. data/lib/rails/generators/bundle_helper.rb +34 -0
  36. data/lib/rails/generators/database.rb +102 -68
  37. data/lib/rails/generators/erb/authentication/authentication_generator.rb +17 -0
  38. data/lib/rails/generators/erb/authentication/templates/app/views/passwords/edit.html.erb +9 -0
  39. data/lib/rails/generators/erb/authentication/templates/app/views/passwords/new.html.erb +8 -0
  40. data/lib/rails/generators/erb/authentication/templates/app/views/sessions/new.html.erb +11 -0
  41. data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +2 -2
  42. data/lib/rails/generators/generated_attribute.rb +34 -23
  43. data/lib/rails/generators/migration.rb +0 -1
  44. data/lib/rails/generators/rails/app/app_generator.rb +50 -37
  45. data/lib/rails/generators/rails/app/templates/Dockerfile.tt +40 -19
  46. data/lib/rails/generators/rails/app/templates/Gemfile.tt +33 -13
  47. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +6 -11
  48. data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +5 -0
  49. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +11 -3
  50. data/lib/rails/generators/rails/app/templates/bin/bundler-audit.tt +5 -0
  51. data/lib/rails/generators/rails/app/templates/bin/ci.tt +5 -0
  52. data/lib/rails/generators/rails/app/templates/bin/dev.tt +1 -0
  53. data/lib/rails/generators/rails/app/templates/bin/rubocop.tt +1 -1
  54. data/lib/rails/generators/rails/app/templates/bin/setup.tt +6 -8
  55. data/lib/rails/generators/rails/app/templates/bin/thrust.tt +4 -0
  56. data/lib/rails/generators/rails/app/templates/config/bundler-audit.yml.tt +5 -0
  57. data/lib/rails/generators/rails/app/templates/config/ci.rb.tt +40 -0
  58. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +33 -2
  59. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +34 -3
  60. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +51 -2
  61. data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +39 -6
  62. data/lib/rails/generators/rails/app/templates/config/deploy.yml.tt +135 -0
  63. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +16 -19
  64. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +38 -50
  65. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +5 -19
  66. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +0 -7
  67. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +4 -0
  68. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +1 -1
  69. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_8_1.rb.tt +74 -0
  70. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +12 -2
  71. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +3 -3
  72. data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +0 -7
  73. data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +1 -6
  74. data/lib/rails/generators/rails/app/templates/dockerignore.tt +9 -2
  75. data/lib/rails/generators/rails/app/templates/github/ci.yml.tt +108 -16
  76. data/lib/rails/generators/rails/app/templates/github/dependabot.yml +2 -2
  77. data/lib/rails/generators/rails/app/templates/gitignore.tt +3 -2
  78. data/lib/rails/generators/rails/app/templates/kamal-secrets.tt +20 -0
  79. data/lib/rails/generators/rails/app/templates/public/400.html +135 -0
  80. data/lib/rails/generators/rails/app/templates/public/404.html +134 -66
  81. data/lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html +134 -65
  82. data/lib/rails/generators/rails/app/templates/public/422.html +134 -66
  83. data/lib/rails/generators/rails/app/templates/public/500.html +134 -65
  84. data/lib/rails/generators/rails/app/templates/public/icon.png +0 -0
  85. data/lib/rails/generators/rails/app/templates/public/icon.svg +2 -2
  86. data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
  87. data/lib/rails/generators/rails/authentication/USAGE +6 -0
  88. data/lib/rails/generators/rails/authentication/authentication_generator.rb +62 -0
  89. data/lib/rails/generators/rails/authentication/templates/app/channels/application_cable/connection.rb.tt +16 -0
  90. data/lib/rails/generators/rails/authentication/templates/app/controllers/concerns/authentication.rb.tt +52 -0
  91. data/lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt +39 -0
  92. data/lib/rails/generators/rails/authentication/templates/app/controllers/sessions_controller.rb.tt +21 -0
  93. data/lib/rails/generators/rails/authentication/templates/app/mailers/passwords_mailer.rb.tt +6 -0
  94. data/lib/rails/generators/rails/authentication/templates/app/models/current.rb.tt +4 -0
  95. data/lib/rails/generators/rails/authentication/templates/app/models/session.rb.tt +3 -0
  96. data/lib/rails/generators/rails/authentication/templates/app/models/user.rb.tt +6 -0
  97. data/lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.html.erb.tt +6 -0
  98. data/lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.text.erb.tt +4 -0
  99. data/lib/rails/generators/rails/benchmark/USAGE +1 -1
  100. data/lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt +0 -2
  101. data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +4 -0
  102. data/lib/rails/generators/rails/db/system/change/change_generator.rb +3 -3
  103. data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +19 -2
  104. data/lib/rails/generators/rails/devcontainer/templates/devcontainer/Dockerfile.tt +5 -1
  105. data/lib/rails/generators/rails/devcontainer/templates/devcontainer/compose.yaml.tt +2 -2
  106. data/lib/rails/generators/rails/devcontainer/templates/devcontainer/devcontainer.json.tt +5 -5
  107. data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +17 -5
  108. data/lib/rails/generators/rails/master_key/master_key_generator.rb +0 -12
  109. data/lib/rails/generators/rails/plugin/plugin_generator.rb +8 -9
  110. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +1 -1
  111. data/lib/rails/generators/rails/plugin/templates/Rakefile.tt +0 -4
  112. data/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +20 -9
  113. data/lib/rails/generators/rails/plugin/templates/github/dependabot.yml +2 -2
  114. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +2 -2
  115. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +3 -3
  116. data/lib/rails/generators/rails/script/USAGE +18 -0
  117. data/lib/rails/generators/rails/script/script_generator.rb +18 -0
  118. data/lib/rails/generators/rails/script/templates/script.rb.tt +3 -0
  119. data/lib/rails/generators/test_unit/authentication/authentication_generator.rb +31 -0
  120. data/lib/rails/generators/test_unit/authentication/templates/test/controllers/passwords_controller_test.rb.tt +67 -0
  121. data/lib/rails/generators/test_unit/authentication/templates/test/controllers/sessions_controller_test.rb +33 -0
  122. data/lib/rails/generators/test_unit/authentication/templates/test/fixtures/users.yml.tt +9 -0
  123. data/lib/rails/generators/test_unit/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb.tt +7 -0
  124. data/lib/rails/generators/test_unit/authentication/templates/test/models/user_test.rb.tt +8 -0
  125. data/lib/rails/generators/test_unit/authentication/templates/test/test_helpers/session_test_helper.rb.tt +19 -0
  126. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +1 -1
  127. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +8 -2
  128. data/lib/rails/generators/test_unit/scaffold/templates/application_system_test_case.rb.tt +5 -0
  129. data/lib/rails/generators/testing/behavior.rb +0 -3
  130. data/lib/rails/generators.rb +4 -1
  131. data/lib/rails/health_controller.rb +10 -2
  132. data/lib/rails/info.rb +4 -4
  133. data/lib/rails/info_controller.rb +11 -6
  134. data/lib/rails/initializable.rb +63 -19
  135. data/lib/rails/paths.rb +3 -3
  136. data/lib/rails/rack/silence_request.rb +36 -0
  137. data/lib/rails/rack.rb +1 -0
  138. data/lib/rails/railtie/configurable.rb +0 -1
  139. data/lib/rails/railtie.rb +0 -1
  140. data/lib/rails/source_annotation_extractor.rb +37 -16
  141. data/lib/rails/tasks/statistics.rake +3 -36
  142. data/lib/rails/tasks.rb +1 -3
  143. data/lib/rails/templates/rails/info/notes.html.erb +88 -0
  144. data/lib/rails/templates/rails/mailers/email.html.erb +6 -5
  145. data/lib/rails/templates/rails/welcome/index.html.erb +19 -3
  146. data/lib/rails/test_unit/line_filtering.rb +24 -3
  147. data/lib/rails/test_unit/reporter.rb +12 -6
  148. data/lib/rails/test_unit/runner.rb +9 -5
  149. data/lib/rails.rb +62 -2
  150. metadata +54 -41
  151. data/lib/rails/console/app.rb +0 -8
  152. data/lib/rails/console/helpers.rb +0 -8
  153. data/lib/rails/console/methods.rb +0 -23
  154. data/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +0 -2
  155. data/lib/rails/generators/rails/app/templates/app/channels/application_cable/channel.rb.tt +0 -4
  156. data/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb.tt +0 -4
  157. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +0 -70
  158. data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +0 -13
  159. data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +0 -13
  160. data/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js.tt +0 -10
  161. data/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js.tt +0 -6
  162. data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js.tt +0 -17
  163. data/lib/rails/generators/test_unit/plugin/plugin_generator.rb +0 -15
  164. data/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +0 -7
  165. data/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6901f0b92ef11f501dfc346db6917e4f8c5612cfe69dcf286b2fe34c7984d00d
4
- data.tar.gz: fc0584d1aa4d6a4900ccbaa846eef834deb35a96e253c0fb3abc47e9216f5ffe
3
+ metadata.gz: 334123c655e707744a770bc40fe4c32e679609cad3292e4cdc7fd347283beca8
4
+ data.tar.gz: c032c9b6c7028a0a1046cfb4a9f5e45e185d3d514a92a9688d4165e65b4499cb
5
5
  SHA512:
6
- metadata.gz: 105b31ef811832df283f6b185b0e2a3277023e949ed32b45bfb64ff99733df720c74b60b83d38679411069a52671f0df1b46add11385219f610c13a9894e2446
7
- data.tar.gz: ef33b6491ada406372baa50d9e1f5ea70e0cae44abca697bea78748610109eca8e91fb68b077c1a5b55e5388f1d7108d78812b4d29da0b8f88143fd93da0f2e3
6
+ metadata.gz: 48815eb77c1c3a69aadfddfb471343fc9e1c5358ebeaf79786cb7708acc96a70c2c4be9b61f49b2a630850bacc7ac4bf643c262be0550e5005126d4ddb012fb9
7
+ data.tar.gz: 57c562bbc170ba845385604f4cfd14324b5d83db23d6f9b73fa310e55a86592cbee756fbd80ffcd34768af6f58d95612e37a2b12526f95e83e78a605c60c1f2d
data/CHANGELOG.md CHANGED
@@ -1,403 +1,322 @@
1
- ## Rails 7.2.3.1 (March 23, 2026) ##
1
+ ## Rails 8.1.4.1 (November 03, 2026) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 7.2.3 (October 28, 2025) ##
7
-
8
- * Use `secret_key_base` from ENV or credentials when present locally.
9
-
10
- When ENV["SECRET_KEY_BASE"] or
11
- `Rails.application.credentials.secret_key_base` is set for test or
12
- development, it is used for the `Rails.config.secret_key_base`,
13
- instead of generating a `tmp/local_secret.txt` file.
14
-
15
- *Petrik de Heus*
16
-
17
-
18
- ## Rails 7.2.2.2 (August 13, 2025) ##
19
-
20
- * No changes.
6
+ ## Rails 8.1.4 (September 24, 2026) ##
21
7
 
8
+ * Include the offending value in the `secret_key_base=` error message.
22
9
 
23
- ## Rails 7.2.2.1 (December 10, 2024) ##
10
+ *Jean Boussier*
24
11
 
25
- * No changes.
12
+ * Load database config when a connection is absent from the shared section.
26
13
 
14
+ `database_configuration` no longer raises `NoMethodError` when a shared
15
+ config section is missing a subsection for a particular connection name.
27
16
 
28
- ## Rails 7.2.2 (October 30, 2024) ##
17
+ *Kenta Ishizaki*
29
18
 
30
- * No changes.
19
+ * Round-trip the `null: false` attribute modifier in `GeneratedAttribute#to_s`.
31
20
 
21
+ `rails generate` now emits the `!` modifier for attributes with `null: false`,
22
+ so the generated command string can be used to regenerate the same migration.
32
23
 
33
- ## Rails 7.2.1.2 (October 23, 2024) ##
24
+ *Kenta Ishizaki*
34
25
 
35
- * No changes.
26
+ * Fix infinite route reload when `after_routes_loaded` hooks access routes.
36
27
 
28
+ The `:loading` state is now held across `after_routes_loaded` hooks, so a
29
+ hook that touches routes no longer triggers a redundant reload.
37
30
 
38
- ## Rails 7.2.1.1 (October 15, 2024) ##
31
+ *Chedli Bourguiba*
39
32
 
40
- * No changes.
33
+ * Fix `LazyRouteSet` thrashing when `url_helpers` are included into `Object`.
41
34
 
35
+ `method_missing` and `respond_to_missing?` now only trigger a route reload
36
+ for methods ending in `_path` or `_url`, preventing every `respond_to?`
37
+ call from re-entering the route loader.
42
38
 
43
- ## Rails 7.2.1 (August 22, 2024) ##
39
+ *Chedli Bourguiba*
44
40
 
45
- * Fix `rails console` for application with non default application constant.
41
+ * Add `RoutesReloader#loaded` to check whether routes have been loaded.
46
42
 
47
- The wrongly assumed the Rails application would be named `AppNamespace::Application`,
48
- which is the default but not an obligation.
43
+ *Rafael Mendonça França*
49
44
 
50
- *Jean Boussier*
45
+ * Mark routes as loaded when the routes reloader executes standalone.
51
46
 
52
- * Fix the default Dockerfile to include the full sqlite3 package.
47
+ `RoutesReloader#execute` now sets the load state to `loaded`, so calling
48
+ it directly (outside of `execute_unless_loaded`) no longer leaves the
49
+ reloader in a state where routes are considered unloaded.
53
50
 
54
- Prior to this it only included `libsqlite3`, so it wasn't enough to
55
- run `rails dbconsole`.
51
+ *Kenta Ishizaki*
56
52
 
57
- *Jerome Dalbert*
53
+ * Make mounted route helpers (e.g. `main_app`, engine mount proxies) trigger
54
+ the lazy route load instead of raising `NoMethodError` when called before
55
+ routes are drawn.
58
56
 
59
- * Don't update public directory during `app:update` command for API-only Applications.
57
+ Named url helpers already loaded routes on demand, but mounted helpers are
58
+ only defined when `mount` runs during the route draw, so calling one first
59
+ (in the console or a test) failed until something else drew the routes.
60
60
 
61
- *y-yagi*
61
+ *Abdelkader Boudih*
62
62
 
63
- * Don't add bin/brakeman if brakeman is not in bundle when upgrading an application.
63
+ * Make lazy route loading thread-safe.
64
64
 
65
- *Etienne Barrié*
65
+ Since routes are drawn on the first request in environments where
66
+ `config.eager_load` is `false` (development and test by default),
67
+ concurrent first requests could dispatch against an empty or half-drawn
68
+ route set, resulting in a 404 for a perfectly valid route. Route drawing
69
+ is now synchronized: concurrent requests wait for the initial draw to
70
+ complete and are then dispatched against the fully drawn route set.
66
71
 
67
- * Remove PWA views and routes if its an API only project.
72
+ *grk*
68
73
 
69
- *Jean Boussier*
74
+ * Validate subcommand in `rails plugin` command.
70
75
 
71
- * Simplify generated Puma configuration
76
+ `rails plugin foo bar` silently ignored the invalid subcommand "foo"
77
+ and proceeded to create a plugin named "bar". Now it prints an error
78
+ and exits with status 1.
72
79
 
73
- *DHH*, *Rafael Mendonça França*
80
+ Fixes #57430.
74
81
 
82
+ *Ruy Rocha*
75
83
 
76
- ## Rails 7.2.0 (August 09, 2024) ##
84
+ * Prevent the internal development welcome route from being duplicated on route reloads.
77
85
 
78
- * The new `bin/rails boot` command boots the application and exits. Supports the
79
- standard `-e/--environment` options.
86
+ *Elliot Temple*
80
87
 
81
- *Xavier Noria*
82
88
 
83
- * Create a Dev Container Generator that generates a Dev Container setup based on the current configuration
84
- of the application. Usage:
89
+ ## Rails 8.1.3.1 (July 29, 2026) ##
85
90
 
86
- `bin/rails devcontainer`
91
+ * No changes.
87
92
 
88
- *Andrew Novoselac*
89
93
 
90
- * Add Rubocop and GitHub Actions to plugin generator.
91
- This can be skipped using --skip-rubocop and --skip-ci.
94
+ ## Rails 8.1.3 (March 24, 2026) ##
92
95
 
93
- *Chris Oliver*
96
+ * Add `libvips` to generated `ci.yml`
94
97
 
95
- * Remove support for `oracle`, `sqlserver` and JRuby specific database adapters from the
96
- `rails new` and `rails db:system:change` commands.
98
+ Conditionally adds `libvips` to `ci.yml`.
97
99
 
98
- The supported options are `sqlite3`, `mysql`, `postgresql` and `trilogy`.
100
+ *Steve Polito*
99
101
 
100
- *Andrew Novoselac*
101
102
 
102
- * Add options to `bin/rails app:update`.
103
+ ## Rails 8.1.2.1 (March 23, 2026) ##
103
104
 
104
- `bin/rails app:update` now supports the same generic options that generators do:
105
+ * No changes.
105
106
 
106
- * `--force`: Accept all changes to existing files
107
- * `--skip`: Refuse all changes to existing files
108
- * `--pretend`: Don't make any changes
109
- * `--quiet`: Don't output all changes made
110
107
 
111
- *Étienne Barrié*
108
+ ## Rails 8.1.2 (January 08, 2026) ##
112
109
 
113
- * Implement Rails console commands and helpers with IRB v1.13's extension APIs.
110
+ * Skip all system test files on app generation.
114
111
 
115
- Rails console users will now see `helper`, `controller`, `new_session`, and `app` under
116
- IRB help message's `Helper methods` category. And `reload!` command will be displayed under
117
- the new `Rails console` commands category.
112
+ *Eileen M. Uchitelle*
118
113
 
119
- Prior to this change, Rails console's commands and helper methods are added through IRB's
120
- private components and don't show up in its help message, which led to poor discoverability.
114
+ * Fix `db:system:change` to correctly update Dockerfile base packages.
121
115
 
122
- *Stan Lo*
116
+ *Josiah Smith*
123
117
 
124
- * Remove deprecated `Rails::Generators::Testing::Behaviour`.
118
+ * Fix devcontainer volume mount when app name differs from folder name.
125
119
 
126
120
  *Rafael Mendonça França*
127
121
 
128
- * Remove deprecated `find_cmd_and_exec` console helper.
122
+ * Fixed the `rails notes` command to properly extract notes in CSS files.
129
123
 
130
- *Rafael Mendonça França*
124
+ *David White*
131
125
 
132
- * Remove deprecated `Rails.config.enable_dependency_loading`.
126
+ * Fixed the default Dockerfile to properly include the `vendor/` directory during `bundle install`.
133
127
 
134
- *Rafael Mendonça França*
128
+ *Zhong Sheng*
135
129
 
136
- * Remove deprecated `Rails.application.secrets`.
137
130
 
138
- *Rafael Mendonça França*
131
+ ## Rails 8.1.1 (October 28, 2025) ##
139
132
 
140
- * Generated Gemfile will include `require: "debug/prelude"` for the `debug` gem.
133
+ * Do not assume and force SSL in production by default when using Kamal, to allow for out of the box Kamal deployments.
141
134
 
142
- Requiring `debug` gem directly automatically activates it, which could introduce
143
- additional overhead and memory usage even without entering a debugging session.
135
+ It is still recommended to assume and force SSL in production as soon as you can.
144
136
 
145
- By making Bundler require `debug/prelude` instead, developers can keep their access
146
- to breakpoint methods like `debugger` or `binding.break`, but the debugger won't be
147
- activated until a breakpoint is hit.
137
+ *Jerome Dalbert*
148
138
 
149
- *Stan Lo*
139
+ ## Rails 8.1.0 (October 22, 2025) ##
150
140
 
151
- * Skip generating a `test` job in ci.yml when a new application is generated with the
152
- `--skip-test` option.
141
+ * Suggest `bin/rails action_text:install` from Action Dispatch error page
153
142
 
154
- *Steve Polito*
143
+ *Sean Doyle*
155
144
 
156
- * Update the `.node-version` file conditionally generated for new applications to 20.11.1
145
+ * Remove deprecated `STATS_DIRECTORIES`.
157
146
 
158
- *Steve Polito*
147
+ *Rafael Mendonça França*
159
148
 
160
- * Fix sanitizer vendor configuration in 7.1 defaults.
149
+ * Remove deprecated `bin/rake stats` command.
161
150
 
162
- In apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up
163
- being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer.
151
+ *Rafael Mendonça França*
164
152
 
165
- *Mike Dalessio*, *Rafael Mendonça França*
153
+ * Remove deprecated `rails/console/methods.rb` file.
166
154
 
167
- * Set `action_mailer.default_url_options` values in `development` and `test`.
155
+ *Rafael Mendonça França*
168
156
 
169
- Prior to this commit, new Rails applications would raise `ActionView::Template::Error`
170
- if a mailer included a url built with a `*_path` helper.
157
+ * Don't generate system tests by default.
171
158
 
172
- *Steve Polito*
159
+ Rails scaffold generator will no longer generate system tests by default. To enable this pass `--system-tests=true` or generate them with `bin/rails generate system_test name_of_test`.
173
160
 
174
- * Introduce `Rails::Generators::Testing::Assertions#assert_initializer`.
161
+ *Eileen M. Uchitelle*
175
162
 
176
- Compliments the existing `initializer` generator action.
163
+ * Optionally skip bundler-audit.
177
164
 
178
- ```rb
179
- assert_initializer "mail_interceptors.rb"
180
- ```
165
+ Skips adding the `bin/bundler-audit` & `config/bundler-audit.yml` if the gem is not installed when `bin/rails app:update` runs.
181
166
 
182
- *Steve Polito*
167
+ Passes an option to `--skip-bundler-audit` when new apps are generated & adds that same option to the `--minimal` generator flag.
183
168
 
184
- * Generate a .devcontainer folder and its contents when creating a new app.
169
+ *Jill Klang*
185
170
 
186
- The .devcontainer folder includes everything needed to boot the app and do development in a remote container.
171
+ * Show engine routes in `/rails/info/routes` as well.
187
172
 
188
- The container setup includes:
189
- - A redis container for Kredis, ActionCable etc.
190
- - A database (SQLite, Postgres, MySQL or MariaDB)
191
- - A Headless chrome container for system tests
192
- - Active Storage configured to use the local disk and with preview features working
173
+ *Petrik de Heus*
193
174
 
194
- If any of these options are skipped in the app setup they will not be included in the container configuration.
175
+ * Exclude `asset_path` configuration from Kamal `deploy.yml` for API applications.
195
176
 
196
- These files can be skipped using the `--skip-devcontainer` option.
177
+ API applications don't serve assets, so the `asset_path` configuration in `deploy.yml`
178
+ is not needed and can cause 404 errors on in-flight requests. The asset_path is now
179
+ only included for regular Rails applications that serve assets.
197
180
 
198
- *Andrew Novoselac & Rafael Mendonça França*
181
+ *Saiqul Haq*
199
182
 
200
- * Introduce `SystemTestCase#served_by` for configuring the System Test application server.
183
+ * Reverted the incorrect default `config.public_file_server.headers` config.
201
184
 
202
- By default this is localhost. This method allows the host and port to be specified manually.
185
+ If you created a new application using Rails `8.1.0.beta1`, make sure to regenerate
186
+ `config/environments/production.rb`, or to manually edit the `config.public_file_server.headers`
187
+ configuration to just be:
203
188
 
204
189
  ```ruby
205
- class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
206
- served_by host: "testserver", port: 45678
207
- end
190
+ # Cache assets for far-future expiry since they are all digest stamped.
191
+ config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
208
192
  ```
209
193
 
210
- *Andrew Novoselac & Rafael Mendonça França*
211
-
212
- * `bin/rails test` will no longer load files named `*_test.rb` if they are located in the `fixtures` folder.
213
-
214
- *Edouard Chin*
215
-
216
- * Ensure logger tags configured with `config.log_tags` are still active in `request.action_dispatch` handlers.
217
-
218
- *KJ Tsanaktsidis*
219
-
220
- * Setup jemalloc in the default Dockerfile for memory optimization.
221
-
222
- *Matt Almeida*, *Jean Boussier*
223
-
224
- * Commented out lines in .railsrc file should not be treated as arguments when using
225
- rails new generator command. Update ARGVScrubber to ignore text after `#` symbols.
226
-
227
- *Willian Tenfen*
228
-
229
- * Skip CSS when generating APIs.
230
-
231
- *Ruy Rocha*
194
+ *Jean Boussier*
232
195
 
233
- * Rails console now indicates application name and the current Rails environment:
196
+ * Add command `rails credentials:fetch PATH` to get the value of a credential from the credentials file.
234
197
 
235
- ```txt
236
- my-app(dev)> # for RAILS_ENV=development
237
- my-app(test)> # for RAILS_ENV=test
238
- my-app(prod)> # for RAILS_ENV=production
239
- my-app(my_env)> # for RAILS_ENV=my_env
198
+ ```bash
199
+ $ bin/rails credentials:fetch kamal_registry.password
240
200
  ```
241
201
 
242
- The application name is derived from the application's module name from `config/application.rb`.
243
- For example, `MyApp` will displayed as `my-app` in the prompt.
202
+ *Matthew Nguyen*, *Jean Boussier*
244
203
 
245
- Additionally, the environment name will be colorized when the environment is
246
- `development` (blue), `test` (blue), or `production` (red), if your
247
- terminal supports it.
204
+ * Generate static BCrypt password digests in fixtures instead of dynamic ERB expressions.
248
205
 
249
- *Stan Lo*
206
+ Previously, fixtures with password digest attributes used `<%= BCrypt::Password.create("secret") %>`,
207
+ which regenerated the hash on each test run. Now generates a static hash with a comment
208
+ showing how to recreate it.
250
209
 
251
- * Ensure `autoload_paths`, `autoload_once_paths`, `eager_load_paths`, and
252
- `load_paths` only have directories when initialized from engine defaults.
210
+ *Nate Smith*, *Cassia Scheffer*
253
211
 
254
- Previously, files under the `app` directory could end up there too.
212
+ * Broaden the `.gitignore` entry when adding a credentials key to ignore all key files.
255
213
 
256
- *Takumasa Ochi*
214
+ *Greg Molnar*
257
215
 
258
- * Prevent unnecessary application reloads in development.
259
-
260
- Previously, some files outside autoload paths triggered unnecessary reloads.
261
- With this fix, application reloads according to `Rails.autoloaders.main.dirs`,
262
- thereby preventing unnecessary reloads.
263
-
264
- *Takumasa Ochi*
265
-
266
- * Use `oven-sh/setup-bun` in GitHub CI when generating an app with Bun.
216
+ * Remove unnecessary `ruby-version` input from `ruby/setup-ruby`
267
217
 
268
218
  *TangRufus*
269
219
 
270
- * Disable `pidfile` generation in the `production` environment.
220
+ * Add --reset option to bin/setup which will call db:reset as part of the setup.
271
221
 
272
- *Hans Schnedlitz*
273
-
274
- * Set `config.action_view.annotate_rendered_view_with_filenames` to `true` in
275
- the `development` environment.
222
+ *DHH*
276
223
 
277
- *Adrian Marin*
224
+ * Add RuboCop cache restoration to RuboCop job in GitHub Actions workflow templates.
278
225
 
279
- * Support the `BACKTRACE` environment variable to turn off backtrace cleaning.
226
+ *Lovro Bikić*
280
227
 
281
- Useful for debugging framework code:
228
+ * Skip generating mailer-related files in authentication generator if the application does
229
+ not use ActionMailer
282
230
 
283
- ```sh
284
- BACKTRACE=1 bin/rails server
285
- ```
231
+ *Rami Massoud*
286
232
 
287
- *Alex Ghiculescu*
233
+ * Introduce `bin/ci` for running your tests, style checks, and security audits locally or in the cloud.
288
234
 
289
- * Raise `ArgumentError` when reading `config.x.something` with arguments:
235
+ The specific steps are defined by a new DSL in `config/ci.rb`.
290
236
 
291
237
  ```ruby
292
- config.x.this_works.this_raises true # raises ArgumentError
238
+ ActiveSupport::ContinuousIntegration.run do
239
+ step "Setup", "bin/setup --skip-server"
240
+ step "Style: Ruby", "bin/rubocop"
241
+ step "Security: Gem audit", "bin/bundler-audit"
242
+ step "Tests: Rails", "bin/rails test test:system"
243
+ end
293
244
  ```
294
245
 
295
- *Sean Doyle*
296
-
297
- * 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.
246
+ Optionally use [gh-signoff](https://github.com/basecamp/gh-signoff) to
247
+ set a green PR status - ready for merge.
298
248
 
299
- *DHH*
249
+ *Jeremy Daer*, *DHH*
300
250
 
301
- * Updated system tests to now use headless Chrome by default for the new applications.
251
+ * Generate session controller tests when running the authentication generator.
302
252
 
303
- *DHH*
253
+ *Jerome Dalbert*
304
254
 
305
- * Add GitHub CI files for Dependabot, Brakeman, RuboCop, and running tests by default. Can be skipped with `--skip-ci`.
255
+ * Add bin/bundler-audit and config/bundler-audit.yml for discovering and managing known security problems with app gems.
306
256
 
307
257
  *DHH*
308
258
 
309
- * Add Brakeman by default for static analysis of security vulnerabilities. Allow skipping with `--skip-brakeman option`.
310
-
311
- *vipulnsward*
312
-
313
- * Add RuboCop with rules from `rubocop-rails-omakase` by default. Skip with `--skip-rubocop`.
314
-
315
- *DHH* and *zzak*
316
-
317
- * Use `bin/rails runner --skip-executor` to not wrap the runner script with an
318
- Executor.
319
-
320
- *Ben Sheldon*
321
-
322
- * Fix isolated engines to take `ActiveRecord::Base.table_name_prefix` into consideration.
259
+ * Rails no longer generates a `bin/bundle` binstub when creating new applications.
323
260
 
324
- This will allow for engine defined models, such as inside Active Storage, to respect
325
- Active Record table name prefix configuration.
261
+ The `bin/bundle` binstub used to help activate the right version of bundler.
262
+ This is no longer necessary as this mechanism is now part of Rubygem itself.
326
263
 
327
- *Chedli Bourguiba*
328
-
329
- * Fix running `db:system:change` when the app has no Dockerfile.
330
-
331
- *Hartley McGuire*
332
-
333
- * In Action Mailer previews, list inline attachments separately from normal
334
- attachments.
335
-
336
- For example, attachments that were previously listed like
337
-
338
- > Attachments: logo.png file1.pdf file2.pdf
339
-
340
- will now be listed like
341
-
342
- > Attachments: file1.pdf file2.pdf (Inline: logo.png)
343
-
344
- *Christian Schmidt* and *Jonathan Hefner*
345
-
346
- * In mailer preview, only show SMTP-To if it differs from the union of To, Cc and Bcc.
264
+ *Edouard Chin*
347
265
 
348
- *Christian Schmidt*
266
+ * Add a `SessionTestHelper` module with `sign_in_as(user)` and `sign_out` test helpers when
267
+ running `rails g authentication`. Simplifies authentication in integration tests.
349
268
 
350
- * Enable YJIT by default on new applications running Ruby 3.3+.
269
+ *Bijan Rahnema*
351
270
 
352
- This can be disabled by setting `Rails.application.config.yjit = false`
271
+ * Rate limit password resets in authentication generator
353
272
 
354
- *Jean Boussier*, *Rafael Mendonça França*
273
+ This helps mitigate abuse from attackers spamming the password reset form.
355
274
 
356
- * In Action Mailer previews, show date from message `Date` header if present.
275
+ *Chris Oliver*
357
276
 
358
- *Sampat Badhe*
277
+ * Update `rails new --minimal` option
359
278
 
360
- * Exit with non-zero status when the migration generator fails.
279
+ Extend the `--minimal` flag to exclude recently added features:
280
+ `skip_brakeman`, `skip_ci`, `skip_docker`, `skip_kamal`, `skip_rubocop`, `skip_solid` and `skip_thruster`.
361
281
 
362
- *Katsuhiko YOSHIDA*
282
+ *eelcoj*
363
283
 
364
- * Use numeric UID and GID in Dockerfile template.
284
+ * Add `application-name` metadata to application layout
365
285
 
366
- The Dockerfile generated by `rails new` sets the default user and group
367
- by name instead of UID:GID. This can cause the following error in Kubernetes:
286
+ The following metatag will be added to `app/views/layouts/application.html.erb`
368
287
 
369
- ```
370
- container has runAsNonRoot and image has non-numeric user (rails), cannot verify user is non-root
288
+ ```html
289
+ <meta name="application-name" content="Name of Rails Application">
371
290
  ```
372
291
 
373
- This change sets default user and group by their numeric values.
292
+ *Steve Polito*
293
+
294
+ * Use `secret_key_base` from ENV or credentials when present locally.
374
295
 
375
- *Ivan Fedotov*
296
+ When ENV["SECRET_KEY_BASE"] or
297
+ `Rails.application.credentials.secret_key_base` is set for test or
298
+ development, it is used for the `Rails.config.secret_key_base`,
299
+ instead of generating a `tmp/local_secret.txt` file.
376
300
 
377
- * Disallow invalid values for rails new options.
301
+ *Petrik de Heus*
378
302
 
379
- The `--database`, `--asset-pipeline`, `--css`, and `--javascript` options
380
- for `rails new` take different arguments. This change validates them.
303
+ * Introduce `RAILS_MASTER_KEY` placeholder in generated ci.yml files
381
304
 
382
- *Tony Drake*, *Akhil G Krishnan*, *Petrik de Heus*
305
+ *Steve Polito*
383
306
 
384
- * Conditionally print `$stdout` when invoking `run_generator`.
307
+ * Colorize the Rails console prompt even on non standard environments.
385
308
 
386
- In an effort to improve the developer experience when debugging
387
- generator tests, we add the ability to conditionally print `$stdout`
388
- instead of capturing it.
309
+ *Lorenzo Zabot*
389
310
 
390
- This allows for calls to `binding.irb` and `puts` work as expected.
311
+ * Don't enable YJIT in development and test environments
391
312
 
392
- ```sh
393
- RAILS_LOG_TO_STDOUT=true ./bin/test test/generators/actions_test.rb
394
- ```
313
+ Development and test environments tend to reload code and redefine methods (e.g. mocking),
314
+ hence YJIT isn't generally faster in these environments.
395
315
 
396
- *Steve Polito*
316
+ *Ali Ismayilov*, *Jean Boussier*
397
317
 
398
- * Remove the option `config.public_file_server.enabled` from the generators
399
- for all environments, as the value is the same in all environments.
318
+ * Only include PermissionsPolicy::Middleware if policy is configured.
400
319
 
401
- *Adrian Hirt*
320
+ *Petrik de Heus*
402
321
 
403
- Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/railties/CHANGELOG.md) for previous changes.
322
+ Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/railties/CHANGELOG.md) for previous changes.