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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +173 -254
- data/lib/minitest/rails_plugin.rb +56 -13
- data/lib/rails/application/bootstrap.rb +5 -1
- data/lib/rails/application/configuration.rb +40 -18
- data/lib/rails/application/default_middleware_stack.rb +5 -1
- data/lib/rails/application/finisher.rb +5 -5
- data/lib/rails/application/routes_reloader.rb +67 -14
- data/lib/rails/application.rb +6 -3
- data/lib/rails/application_controller.rb +2 -0
- data/lib/rails/backtrace_cleaner.rb +2 -2
- data/lib/rails/code_statistics.rb +131 -86
- data/lib/rails/code_statistics_calculator.rb +78 -76
- data/lib/rails/command/base.rb +0 -2
- data/lib/rails/command/environment_argument.rb +0 -1
- data/lib/rails/command/helpers/editor.rb +1 -1
- data/lib/rails/command.rb +1 -7
- data/lib/rails/commands/app/update_command.rb +6 -9
- data/lib/rails/commands/console/irb_console.rb +7 -10
- data/lib/rails/commands/credentials/USAGE +4 -4
- data/lib/rails/commands/credentials/credentials_command.rb +30 -6
- data/lib/rails/commands/dev/dev_command.rb +1 -1
- data/lib/rails/commands/devcontainer/devcontainer_command.rb +3 -1
- data/lib/rails/commands/encrypted/encrypted_command.rb +0 -1
- data/lib/rails/commands/plugin/plugin_command.rb +10 -1
- data/lib/rails/commands/stats/stats_command.rb +19 -0
- data/lib/rails/dev_caching.rb +2 -2
- data/lib/rails/engine/configuration.rb +3 -1
- data/lib/rails/engine/lazy_route_set.rb +163 -0
- data/lib/rails/engine.rb +11 -8
- data/lib/rails/gem_version.rb +3 -3
- data/lib/rails/generators/actions.rb +5 -6
- data/lib/rails/generators/app_base.rb +113 -69
- data/lib/rails/generators/base.rb +0 -4
- data/lib/rails/generators/bundle_helper.rb +34 -0
- data/lib/rails/generators/database.rb +102 -68
- data/lib/rails/generators/erb/authentication/authentication_generator.rb +17 -0
- data/lib/rails/generators/erb/authentication/templates/app/views/passwords/edit.html.erb +9 -0
- data/lib/rails/generators/erb/authentication/templates/app/views/passwords/new.html.erb +8 -0
- data/lib/rails/generators/erb/authentication/templates/app/views/sessions/new.html.erb +11 -0
- data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +2 -2
- data/lib/rails/generators/generated_attribute.rb +34 -23
- data/lib/rails/generators/migration.rb +0 -1
- data/lib/rails/generators/rails/app/app_generator.rb +50 -37
- data/lib/rails/generators/rails/app/templates/Dockerfile.tt +40 -19
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +33 -13
- data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +6 -11
- data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +5 -0
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +11 -3
- data/lib/rails/generators/rails/app/templates/bin/bundler-audit.tt +5 -0
- data/lib/rails/generators/rails/app/templates/bin/ci.tt +5 -0
- data/lib/rails/generators/rails/app/templates/bin/dev.tt +1 -0
- data/lib/rails/generators/rails/app/templates/bin/rubocop.tt +1 -1
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +6 -8
- data/lib/rails/generators/rails/app/templates/bin/thrust.tt +4 -0
- data/lib/rails/generators/rails/app/templates/config/bundler-audit.yml.tt +5 -0
- data/lib/rails/generators/rails/app/templates/config/ci.rb.tt +40 -0
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +33 -2
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +34 -3
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +51 -2
- data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +39 -6
- data/lib/rails/generators/rails/app/templates/config/deploy.yml.tt +135 -0
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +16 -19
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +38 -50
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +5 -19
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +0 -7
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +4 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_8_1.rb.tt +74 -0
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +12 -2
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +0 -7
- data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +1 -6
- data/lib/rails/generators/rails/app/templates/dockerignore.tt +9 -2
- data/lib/rails/generators/rails/app/templates/github/ci.yml.tt +108 -16
- data/lib/rails/generators/rails/app/templates/github/dependabot.yml +2 -2
- data/lib/rails/generators/rails/app/templates/gitignore.tt +3 -2
- data/lib/rails/generators/rails/app/templates/kamal-secrets.tt +20 -0
- data/lib/rails/generators/rails/app/templates/public/400.html +135 -0
- data/lib/rails/generators/rails/app/templates/public/404.html +134 -66
- data/lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html +134 -65
- data/lib/rails/generators/rails/app/templates/public/422.html +134 -66
- data/lib/rails/generators/rails/app/templates/public/500.html +134 -65
- data/lib/rails/generators/rails/app/templates/public/icon.png +0 -0
- data/lib/rails/generators/rails/app/templates/public/icon.svg +2 -2
- data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
- data/lib/rails/generators/rails/authentication/USAGE +6 -0
- data/lib/rails/generators/rails/authentication/authentication_generator.rb +62 -0
- data/lib/rails/generators/rails/authentication/templates/app/channels/application_cable/connection.rb.tt +16 -0
- data/lib/rails/generators/rails/authentication/templates/app/controllers/concerns/authentication.rb.tt +52 -0
- data/lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt +39 -0
- data/lib/rails/generators/rails/authentication/templates/app/controllers/sessions_controller.rb.tt +21 -0
- data/lib/rails/generators/rails/authentication/templates/app/mailers/passwords_mailer.rb.tt +6 -0
- data/lib/rails/generators/rails/authentication/templates/app/models/current.rb.tt +4 -0
- data/lib/rails/generators/rails/authentication/templates/app/models/session.rb.tt +3 -0
- data/lib/rails/generators/rails/authentication/templates/app/models/user.rb.tt +6 -0
- data/lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.html.erb.tt +6 -0
- data/lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.text.erb.tt +4 -0
- data/lib/rails/generators/rails/benchmark/USAGE +1 -1
- data/lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt +0 -2
- data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +4 -0
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +3 -3
- data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +19 -2
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/Dockerfile.tt +5 -1
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/compose.yaml.tt +2 -2
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/devcontainer.json.tt +5 -5
- data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +17 -5
- data/lib/rails/generators/rails/master_key/master_key_generator.rb +0 -12
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +8 -9
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/Rakefile.tt +0 -4
- data/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +20 -9
- data/lib/rails/generators/rails/plugin/templates/github/dependabot.yml +2 -2
- data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +2 -2
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +3 -3
- data/lib/rails/generators/rails/script/USAGE +18 -0
- data/lib/rails/generators/rails/script/script_generator.rb +18 -0
- data/lib/rails/generators/rails/script/templates/script.rb.tt +3 -0
- data/lib/rails/generators/test_unit/authentication/authentication_generator.rb +31 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/controllers/passwords_controller_test.rb.tt +67 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/controllers/sessions_controller_test.rb +33 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/fixtures/users.yml.tt +9 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb.tt +7 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/models/user_test.rb.tt +8 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/test_helpers/session_test_helper.rb.tt +19 -0
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +1 -1
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +8 -2
- data/lib/rails/generators/test_unit/scaffold/templates/application_system_test_case.rb.tt +5 -0
- data/lib/rails/generators/testing/behavior.rb +0 -3
- data/lib/rails/generators.rb +4 -1
- data/lib/rails/health_controller.rb +10 -2
- data/lib/rails/info.rb +4 -4
- data/lib/rails/info_controller.rb +11 -6
- data/lib/rails/initializable.rb +63 -19
- data/lib/rails/paths.rb +3 -3
- data/lib/rails/rack/silence_request.rb +36 -0
- data/lib/rails/rack.rb +1 -0
- data/lib/rails/railtie/configurable.rb +0 -1
- data/lib/rails/railtie.rb +0 -1
- data/lib/rails/source_annotation_extractor.rb +37 -16
- data/lib/rails/tasks/statistics.rake +3 -36
- data/lib/rails/tasks.rb +1 -3
- data/lib/rails/templates/rails/info/notes.html.erb +88 -0
- data/lib/rails/templates/rails/mailers/email.html.erb +6 -5
- data/lib/rails/templates/rails/welcome/index.html.erb +19 -3
- data/lib/rails/test_unit/line_filtering.rb +24 -3
- data/lib/rails/test_unit/reporter.rb +12 -6
- data/lib/rails/test_unit/runner.rb +9 -5
- data/lib/rails.rb +62 -2
- metadata +54 -41
- data/lib/rails/console/app.rb +0 -8
- data/lib/rails/console/helpers.rb +0 -8
- data/lib/rails/console/methods.rb +0 -23
- data/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +0 -2
- data/lib/rails/generators/rails/app/templates/app/channels/application_cable/channel.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +0 -70
- data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +0 -13
- data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +0 -13
- data/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js.tt +0 -10
- data/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js.tt +0 -6
- data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js.tt +0 -17
- data/lib/rails/generators/test_unit/plugin/plugin_generator.rb +0 -15
- data/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +0 -7
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 334123c655e707744a770bc40fe4c32e679609cad3292e4cdc7fd347283beca8
|
|
4
|
+
data.tar.gz: c032c9b6c7028a0a1046cfb4a9f5e45e185d3d514a92a9688d4165e65b4499cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48815eb77c1c3a69aadfddfb471343fc9e1c5358ebeaf79786cb7708acc96a70c2c4be9b61f49b2a630850bacc7ac4bf643c262be0550e5005126d4ddb012fb9
|
|
7
|
+
data.tar.gz: 57c562bbc170ba845385604f4cfd14324b5d83db23d6f9b73fa310e55a86592cbee756fbd80ffcd34768af6f58d95612e37a2b12526f95e83e78a605c60c1f2d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,403 +1,322 @@
|
|
|
1
|
-
## Rails
|
|
1
|
+
## Rails 8.1.4.1 (November 03, 2026) ##
|
|
2
2
|
|
|
3
3
|
* No changes.
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
## Rails
|
|
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
|
-
|
|
10
|
+
*Jean Boussier*
|
|
24
11
|
|
|
25
|
-
*
|
|
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
|
-
|
|
17
|
+
*Kenta Ishizaki*
|
|
29
18
|
|
|
30
|
-
*
|
|
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
|
-
|
|
24
|
+
*Kenta Ishizaki*
|
|
34
25
|
|
|
35
|
-
*
|
|
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
|
-
|
|
31
|
+
*Chedli Bourguiba*
|
|
39
32
|
|
|
40
|
-
*
|
|
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
|
-
|
|
39
|
+
*Chedli Bourguiba*
|
|
44
40
|
|
|
45
|
-
*
|
|
41
|
+
* Add `RoutesReloader#loaded` to check whether routes have been loaded.
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
which is the default but not an obligation.
|
|
43
|
+
*Rafael Mendonça França*
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
* Mark routes as loaded when the routes reloader executes standalone.
|
|
51
46
|
|
|
52
|
-
|
|
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
|
-
|
|
55
|
-
run `rails dbconsole`.
|
|
51
|
+
*Kenta Ishizaki*
|
|
56
52
|
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
61
|
+
*Abdelkader Boudih*
|
|
62
62
|
|
|
63
|
-
*
|
|
63
|
+
* Make lazy route loading thread-safe.
|
|
64
64
|
|
|
65
|
-
|
|
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
|
-
*
|
|
72
|
+
*grk*
|
|
68
73
|
|
|
69
|
-
|
|
74
|
+
* Validate subcommand in `rails plugin` command.
|
|
70
75
|
|
|
71
|
-
|
|
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
|
-
|
|
80
|
+
Fixes #57430.
|
|
74
81
|
|
|
82
|
+
*Ruy Rocha*
|
|
75
83
|
|
|
76
|
-
|
|
84
|
+
* Prevent the internal development welcome route from being duplicated on route reloads.
|
|
77
85
|
|
|
78
|
-
*
|
|
79
|
-
standard `-e/--environment` options.
|
|
86
|
+
*Elliot Temple*
|
|
80
87
|
|
|
81
|
-
*Xavier Noria*
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
of the application. Usage:
|
|
89
|
+
## Rails 8.1.3.1 (July 29, 2026) ##
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
* No changes.
|
|
87
92
|
|
|
88
|
-
*Andrew Novoselac*
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
This can be skipped using --skip-rubocop and --skip-ci.
|
|
94
|
+
## Rails 8.1.3 (March 24, 2026) ##
|
|
92
95
|
|
|
93
|
-
|
|
96
|
+
* Add `libvips` to generated `ci.yml`
|
|
94
97
|
|
|
95
|
-
|
|
96
|
-
`rails new` and `rails db:system:change` commands.
|
|
98
|
+
Conditionally adds `libvips` to `ci.yml`.
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
*Steve Polito*
|
|
99
101
|
|
|
100
|
-
*Andrew Novoselac*
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
## Rails 8.1.2.1 (March 23, 2026) ##
|
|
103
104
|
|
|
104
|
-
|
|
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
|
-
|
|
108
|
+
## Rails 8.1.2 (January 08, 2026) ##
|
|
112
109
|
|
|
113
|
-
*
|
|
110
|
+
* Skip all system test files on app generation.
|
|
114
111
|
|
|
115
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
116
|
+
*Josiah Smith*
|
|
123
117
|
|
|
124
|
-
*
|
|
118
|
+
* Fix devcontainer volume mount when app name differs from folder name.
|
|
125
119
|
|
|
126
120
|
*Rafael Mendonça França*
|
|
127
121
|
|
|
128
|
-
*
|
|
122
|
+
* Fixed the `rails notes` command to properly extract notes in CSS files.
|
|
129
123
|
|
|
130
|
-
*
|
|
124
|
+
*David White*
|
|
131
125
|
|
|
132
|
-
*
|
|
126
|
+
* Fixed the default Dockerfile to properly include the `vendor/` directory during `bundle install`.
|
|
133
127
|
|
|
134
|
-
*
|
|
128
|
+
*Zhong Sheng*
|
|
135
129
|
|
|
136
|
-
* Remove deprecated `Rails.application.secrets`.
|
|
137
130
|
|
|
138
|
-
|
|
131
|
+
## Rails 8.1.1 (October 28, 2025) ##
|
|
139
132
|
|
|
140
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
139
|
+
## Rails 8.1.0 (October 22, 2025) ##
|
|
150
140
|
|
|
151
|
-
*
|
|
152
|
-
`--skip-test` option.
|
|
141
|
+
* Suggest `bin/rails action_text:install` from Action Dispatch error page
|
|
153
142
|
|
|
154
|
-
*
|
|
143
|
+
*Sean Doyle*
|
|
155
144
|
|
|
156
|
-
*
|
|
145
|
+
* Remove deprecated `STATS_DIRECTORIES`.
|
|
157
146
|
|
|
158
|
-
*
|
|
147
|
+
*Rafael Mendonça França*
|
|
159
148
|
|
|
160
|
-
*
|
|
149
|
+
* Remove deprecated `bin/rake stats` command.
|
|
161
150
|
|
|
162
|
-
|
|
163
|
-
being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer.
|
|
151
|
+
*Rafael Mendonça França*
|
|
164
152
|
|
|
165
|
-
|
|
153
|
+
* Remove deprecated `rails/console/methods.rb` file.
|
|
166
154
|
|
|
167
|
-
*
|
|
155
|
+
*Rafael Mendonça França*
|
|
168
156
|
|
|
169
|
-
|
|
170
|
-
if a mailer included a url built with a `*_path` helper.
|
|
157
|
+
* Don't generate system tests by default.
|
|
171
158
|
|
|
172
|
-
|
|
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
|
-
*
|
|
161
|
+
*Eileen M. Uchitelle*
|
|
175
162
|
|
|
176
|
-
|
|
163
|
+
* Optionally skip bundler-audit.
|
|
177
164
|
|
|
178
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
169
|
+
*Jill Klang*
|
|
185
170
|
|
|
186
|
-
|
|
171
|
+
* Show engine routes in `/rails/info/routes` as well.
|
|
187
172
|
|
|
188
|
-
|
|
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
|
-
|
|
175
|
+
* Exclude `asset_path` configuration from Kamal `deploy.yml` for API applications.
|
|
195
176
|
|
|
196
|
-
|
|
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
|
-
*
|
|
181
|
+
*Saiqul Haq*
|
|
199
182
|
|
|
200
|
-
*
|
|
183
|
+
* Reverted the incorrect default `config.public_file_server.headers` config.
|
|
201
184
|
|
|
202
|
-
|
|
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
|
-
|
|
206
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
196
|
+
* Add command `rails credentials:fetch PATH` to get the value of a credential from the credentials file.
|
|
234
197
|
|
|
235
|
-
```
|
|
236
|
-
|
|
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
|
-
|
|
243
|
-
For example, `MyApp` will displayed as `my-app` in the prompt.
|
|
202
|
+
*Matthew Nguyen*, *Jean Boussier*
|
|
244
203
|
|
|
245
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
252
|
-
`load_paths` only have directories when initialized from engine defaults.
|
|
210
|
+
*Nate Smith*, *Cassia Scheffer*
|
|
253
211
|
|
|
254
|
-
|
|
212
|
+
* Broaden the `.gitignore` entry when adding a credentials key to ignore all key files.
|
|
255
213
|
|
|
256
|
-
*
|
|
214
|
+
*Greg Molnar*
|
|
257
215
|
|
|
258
|
-
*
|
|
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
|
-
*
|
|
220
|
+
* Add --reset option to bin/setup which will call db:reset as part of the setup.
|
|
271
221
|
|
|
272
|
-
*
|
|
273
|
-
|
|
274
|
-
* Set `config.action_view.annotate_rendered_view_with_filenames` to `true` in
|
|
275
|
-
the `development` environment.
|
|
222
|
+
*DHH*
|
|
276
223
|
|
|
277
|
-
|
|
224
|
+
* Add RuboCop cache restoration to RuboCop job in GitHub Actions workflow templates.
|
|
278
225
|
|
|
279
|
-
*
|
|
226
|
+
*Lovro Bikić*
|
|
280
227
|
|
|
281
|
-
|
|
228
|
+
* Skip generating mailer-related files in authentication generator if the application does
|
|
229
|
+
not use ActionMailer
|
|
282
230
|
|
|
283
|
-
|
|
284
|
-
BACKTRACE=1 bin/rails server
|
|
285
|
-
```
|
|
231
|
+
*Rami Massoud*
|
|
286
232
|
|
|
287
|
-
|
|
233
|
+
* Introduce `bin/ci` for running your tests, style checks, and security audits locally or in the cloud.
|
|
288
234
|
|
|
289
|
-
|
|
235
|
+
The specific steps are defined by a new DSL in `config/ci.rb`.
|
|
290
236
|
|
|
291
237
|
```ruby
|
|
292
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
251
|
+
* Generate session controller tests when running the authentication generator.
|
|
302
252
|
|
|
303
|
-
*
|
|
253
|
+
*Jerome Dalbert*
|
|
304
254
|
|
|
305
|
-
* Add
|
|
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
|
-
*
|
|
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
|
-
|
|
325
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
269
|
+
*Bijan Rahnema*
|
|
351
270
|
|
|
352
|
-
|
|
271
|
+
* Rate limit password resets in authentication generator
|
|
353
272
|
|
|
354
|
-
|
|
273
|
+
This helps mitigate abuse from attackers spamming the password reset form.
|
|
355
274
|
|
|
356
|
-
*
|
|
275
|
+
*Chris Oliver*
|
|
357
276
|
|
|
358
|
-
|
|
277
|
+
* Update `rails new --minimal` option
|
|
359
278
|
|
|
360
|
-
|
|
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
|
-
*
|
|
282
|
+
*eelcoj*
|
|
363
283
|
|
|
364
|
-
*
|
|
284
|
+
* Add `application-name` metadata to application layout
|
|
365
285
|
|
|
366
|
-
The
|
|
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
|
-
|
|
288
|
+
```html
|
|
289
|
+
<meta name="application-name" content="Name of Rails Application">
|
|
371
290
|
```
|
|
372
291
|
|
|
373
|
-
|
|
292
|
+
*Steve Polito*
|
|
293
|
+
|
|
294
|
+
* Use `secret_key_base` from ENV or credentials when present locally.
|
|
374
295
|
|
|
375
|
-
|
|
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
|
-
*
|
|
301
|
+
*Petrik de Heus*
|
|
378
302
|
|
|
379
|
-
|
|
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
|
-
*
|
|
305
|
+
*Steve Polito*
|
|
383
306
|
|
|
384
|
-
*
|
|
307
|
+
* Colorize the Rails console prompt even on non standard environments.
|
|
385
308
|
|
|
386
|
-
|
|
387
|
-
generator tests, we add the ability to conditionally print `$stdout`
|
|
388
|
-
instead of capturing it.
|
|
309
|
+
*Lorenzo Zabot*
|
|
389
310
|
|
|
390
|
-
|
|
311
|
+
* Don't enable YJIT in development and test environments
|
|
391
312
|
|
|
392
|
-
|
|
393
|
-
|
|
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
|
-
*
|
|
316
|
+
*Ali Ismayilov*, *Jean Boussier*
|
|
397
317
|
|
|
398
|
-
*
|
|
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
|
-
*
|
|
320
|
+
*Petrik de Heus*
|
|
402
321
|
|
|
403
|
-
Please check [
|
|
322
|
+
Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/railties/CHANGELOG.md) for previous changes.
|