railties 6.1.7.8 → 7.0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +219 -320
- data/RDOC_MAIN.rdoc +16 -16
- data/README.rdoc +1 -2
- data/lib/minitest/rails_plugin.rb +1 -1
- data/lib/rails/all.rb +0 -1
- data/lib/rails/app_updater.rb +9 -6
- data/lib/rails/application/bootstrap.rb +24 -5
- data/lib/rails/application/configuration.rb +95 -33
- data/lib/rails/application/default_middleware_stack.rb +22 -3
- data/lib/rails/application/finisher.rb +53 -95
- data/lib/rails/application/routes_reloader.rb +8 -0
- data/lib/rails/application.rb +74 -101
- data/lib/rails/application_controller.rb +3 -3
- data/lib/rails/autoloaders/inflector.rb +21 -0
- data/lib/rails/autoloaders.rb +42 -42
- data/lib/rails/code_statistics.rb +2 -2
- data/lib/rails/code_statistics_calculator.rb +10 -1
- data/lib/rails/command/base.rb +26 -12
- data/lib/rails/command/behavior.rb +1 -1
- data/lib/rails/command/environment_argument.rb +1 -1
- data/lib/rails/command.rb +9 -6
- data/lib/rails/commands/console/console_command.rb +4 -0
- data/lib/rails/commands/credentials/USAGE +4 -2
- data/lib/rails/commands/credentials/credentials_command/diffing.rb +26 -16
- data/lib/rails/commands/credentials/credentials_command.rb +7 -3
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +10 -11
- data/lib/rails/commands/help/USAGE +3 -2
- data/lib/rails/commands/runner/runner_command.rb +3 -2
- data/lib/rails/commands/server/server_command.rb +7 -5
- data/lib/rails/configuration.rb +18 -23
- data/lib/rails/console/helpers.rb +2 -2
- data/lib/rails/engine/configuration.rb +3 -3
- data/lib/rails/engine.rb +31 -37
- data/lib/rails/gem_version.rb +5 -5
- data/lib/rails/generators/actions/create_migration.rb +2 -4
- data/lib/rails/generators/actions.rb +229 -62
- data/lib/rails/generators/app_base.rb +155 -130
- data/lib/rails/generators/app_name.rb +1 -1
- data/lib/rails/generators/base.rb +12 -16
- data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +2 -0
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +8 -8
- data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +8 -4
- data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +11 -28
- data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +7 -3
- data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +17 -0
- data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +8 -17
- data/lib/rails/generators/erb.rb +1 -1
- data/lib/rails/generators/generated_attribute.rb +45 -9
- data/lib/rails/generators/migration.rb +2 -6
- data/lib/rails/generators/model_helpers.rb +1 -1
- data/lib/rails/generators/named_base.rb +13 -13
- data/lib/rails/generators/rails/app/app_generator.rb +70 -91
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +44 -52
- data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +2 -2
- data/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/app/models/application_record.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +3 -9
- data/lib/rails/generators/rails/app/templates/bin/rails.tt +1 -4
- data/lib/rails/generators/rails/app/templates/bin/rake.tt +0 -3
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +9 -14
- data/lib/rails/generators/rails/app/templates/config/application.rb.tt +0 -1
- data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +2 -2
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +2 -2
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +2 -2
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +5 -5
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +7 -13
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +12 -39
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +7 -12
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +1 -5
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +21 -28
- data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt +4 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt +143 -0
- data/lib/rails/generators/rails/app/templates/config/locales/en.yml +3 -3
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +4 -1
- data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +5 -5
- data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/gitattributes.tt +0 -5
- data/lib/rails/generators/rails/app/templates/gitignore.tt +3 -1
- data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +1 -1
- data/lib/rails/generators/rails/controller/controller_generator.rb +1 -2
- data/lib/rails/generators/rails/controller/templates/controller.rb.tt +0 -4
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +1 -1
- data/lib/rails/generators/rails/generator/templates/%file_name%_generator.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +76 -27
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +7 -3
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +9 -31
- data/lib/rails/generators/rails/plugin/templates/README.md.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +0 -3
- data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +7 -6
- data/lib/rails/generators/rails/plugin/templates/gitignore.tt +0 -5
- data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +2 -7
- data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +0 -19
- data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -5
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +6 -10
- data/lib/rails/generators/resource_helpers.rb +2 -2
- data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +2 -2
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +3 -3
- data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +5 -5
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +7 -7
- data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +9 -11
- data/lib/rails/generators/testing/behaviour.rb +3 -4
- data/lib/rails/generators.rb +17 -24
- data/lib/rails/info.rb +1 -1
- data/lib/rails/info_controller.rb +1 -3
- data/lib/rails/initializable.rb +1 -1
- data/lib/rails/mailers_controller.rb +2 -4
- data/lib/rails/paths.rb +1 -1
- data/lib/rails/rack/logger.rb +7 -9
- data/lib/rails/railtie/configuration.rb +1 -2
- data/lib/rails/railtie.rb +36 -13
- data/lib/rails/ruby_version_check.rb +3 -3
- data/lib/rails/source_annotation_extractor.rb +1 -1
- data/lib/rails/tasks/framework.rake +7 -9
- data/lib/rails/tasks/statistics.rake +3 -1
- data/lib/rails/tasks/tmp.rake +8 -1
- data/lib/rails/tasks/yarn.rake +8 -9
- data/lib/rails/tasks/zeitwerk.rake +2 -10
- data/lib/rails/templates/layouts/application.html.erb +15 -0
- data/lib/rails/templates/rails/mailers/email.html.erb +13 -11
- data/lib/rails/templates/rails/welcome/index.html.erb +64 -48
- data/lib/rails/test_help.rb +4 -0
- data/lib/rails/test_unit/railtie.rb +0 -4
- data/lib/rails/test_unit/runner.rb +16 -9
- data/lib/rails/test_unit/testing.rake +4 -9
- data/lib/rails/version.rb +1 -1
- data/lib/rails/welcome_controller.rb +1 -0
- data/lib/rails.rb +13 -2
- metadata +33 -37
- data/lib/rails/command/spellchecker.rb +0 -57
- data/lib/rails/generators/css/assets/assets_generator.rb +0 -15
- data/lib/rails/generators/css/assets/templates/stylesheet.css +0 -4
- data/lib/rails/generators/css/scaffold/scaffold_generator.rb +0 -18
- data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +0 -6
- data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +0 -5
- data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +0 -23
- data/lib/rails/generators/rails/app/templates/bin/spring.tt +0 -13
- data/lib/rails/generators/rails/app/templates/bin/yarn.tt +0 -16
- data/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb.tt +0 -8
- data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +0 -8
- data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb.tt +0 -5
- data/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +0 -67
- data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +0 -16
- data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +0 -6
- data/lib/rails/generators/rails/app/templates/package.json.tt +0 -11
- data/lib/rails/generators/rails/assets/USAGE +0 -16
- data/lib/rails/generators/rails/assets/assets_generator.rb +0 -26
- data/lib/rails/generators/rails/assets/templates/stylesheet.css +0 -4
- data/lib/rails/generators/rails/scaffold/templates/scaffold.css +0 -80
data/CHANGELOG.md
CHANGED
@@ -1,539 +1,438 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 7.0.8.6 (October 23, 2024) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails
|
6
|
+
## Rails 7.0.8.5 (October 15, 2024) ##
|
7
7
|
|
8
8
|
* No changes.
|
9
9
|
|
10
10
|
|
11
|
-
## Rails
|
11
|
+
## Rails 7.0.8.4 (June 04, 2024) ##
|
12
12
|
|
13
13
|
* No changes.
|
14
14
|
|
15
15
|
|
16
|
-
## Rails
|
16
|
+
## Rails 7.0.8.3 (May 17, 2024) ##
|
17
17
|
|
18
18
|
* No changes.
|
19
19
|
|
20
20
|
|
21
|
-
## Rails
|
21
|
+
## Rails 7.0.8.2 (May 16, 2024) ##
|
22
22
|
|
23
23
|
* No changes.
|
24
24
|
|
25
25
|
|
26
|
-
## Rails
|
26
|
+
## Rails 7.0.8.1 (February 21, 2024) ##
|
27
27
|
|
28
28
|
* No changes.
|
29
29
|
|
30
30
|
|
31
|
-
## Rails
|
31
|
+
## Rails 7.0.8 (September 09, 2023) ##
|
32
32
|
|
33
|
-
*
|
34
|
-
|
35
|
-
|
36
|
-
## Rails 6.1.7.1 (January 17, 2023) ##
|
37
|
-
|
38
|
-
* No changes.
|
33
|
+
* Omit `webdrivers` gem dependency from `Gemfile` template
|
39
34
|
|
35
|
+
*Sean Doyle*
|
40
36
|
|
41
|
-
## Rails
|
37
|
+
## Rails 7.0.7.2 (August 22, 2023) ##
|
42
38
|
|
43
39
|
* No changes.
|
44
40
|
|
45
41
|
|
46
|
-
## Rails
|
42
|
+
## Rails 7.0.7.1 (August 22, 2023) ##
|
47
43
|
|
48
44
|
* No changes.
|
49
45
|
|
50
46
|
|
51
|
-
## Rails
|
52
|
-
|
53
|
-
* No changes.
|
54
|
-
|
47
|
+
## Rails 7.0.7 (August 09, 2023) ##
|
55
48
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
## Rails 6.1.5 (March 09, 2022) ##
|
62
|
-
|
63
|
-
* In `zeitwerk` mode, setup the `once` autoloader first, and the `main` autoloader after it.
|
64
|
-
This order plays better with shared namespaces.
|
65
|
-
|
66
|
-
*Xavier Noria*
|
49
|
+
* Update default scaffold templates to set 303 (See Other) as status code
|
50
|
+
on redirect for the update action for XHR requests other than GET or POST
|
51
|
+
to avoid issues (e.g browsers trying to follow the redirect using the
|
52
|
+
original request method resulting in double PATCH/PUT)
|
67
53
|
|
68
|
-
*
|
54
|
+
*Guillermo Iguaran*
|
69
55
|
|
70
|
-
*Alex Ghiculescu*
|
71
56
|
|
72
|
-
|
57
|
+
## Rails 7.0.6 (June 29, 2023) ##
|
58
|
+
* Avoid escaping paths when editing credentials.
|
73
59
|
|
74
|
-
*
|
60
|
+
*Jonathan Hefner*
|
75
61
|
|
76
62
|
|
77
|
-
## Rails
|
63
|
+
## Rails 7.0.5.1 (June 26, 2023) ##
|
78
64
|
|
79
65
|
* No changes.
|
80
66
|
|
81
67
|
|
82
|
-
## Rails
|
68
|
+
## Rails 7.0.5 (May 24, 2023) ##
|
83
69
|
|
84
|
-
*
|
70
|
+
* Add puma app server to Gemfile in order to start test/dummy.
|
85
71
|
|
72
|
+
*Donapieppo*
|
86
73
|
|
87
|
-
|
74
|
+
* Rails console now disables `IRB`'s autocompletion feature in production by default.
|
88
75
|
|
89
|
-
|
76
|
+
Setting `IRB_USE_AUTOCOMPLETE=true` can override this default.
|
90
77
|
|
78
|
+
*Stan Lo*
|
91
79
|
|
92
|
-
|
80
|
+
* Send 303 See Other status code back for the destroy action on newly generated
|
81
|
+
scaffold controllers.
|
93
82
|
|
94
|
-
*
|
83
|
+
*Tony Drake*
|
95
84
|
|
96
85
|
|
97
|
-
## Rails
|
86
|
+
## Rails 7.0.4.3 (March 13, 2023) ##
|
98
87
|
|
99
|
-
*
|
88
|
+
* No changes.
|
100
89
|
|
101
|
-
[Fixes: #43864]
|
102
90
|
|
103
|
-
## Rails
|
91
|
+
## Rails 7.0.4.2 (January 24, 2023) ##
|
104
92
|
|
105
93
|
* No changes.
|
106
94
|
|
107
95
|
|
108
|
-
## Rails
|
96
|
+
## Rails 7.0.4.1 (January 17, 2023) ##
|
109
97
|
|
110
98
|
* No changes.
|
111
99
|
|
112
100
|
|
113
|
-
## Rails
|
101
|
+
## Rails 7.0.4 (September 09, 2022) ##
|
114
102
|
|
115
|
-
*
|
116
|
-
|
117
|
-
Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
|
118
|
-
`Rails.application.config_for` now uses `YAML.unsafe_load` if available.
|
103
|
+
* `config.allow_concurrency = false` now use a `Monitor` instead of a `Mutex`
|
119
104
|
|
120
|
-
|
121
|
-
|
122
|
-
* Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
|
105
|
+
This allows to enable `config.active_support.executor_around_test_case` even
|
106
|
+
when `config.allow_concurrency` is disabled.
|
123
107
|
|
124
108
|
*Jean Boussier*
|
125
109
|
|
126
|
-
*
|
127
|
-
|
128
|
-
*euxx*
|
129
|
-
|
130
|
-
|
131
|
-
## Rails 6.1.3.2 (May 05, 2021) ##
|
132
|
-
|
133
|
-
* No changes.
|
134
|
-
|
135
|
-
|
136
|
-
## Rails 6.1.3.1 (March 26, 2021) ##
|
137
|
-
|
138
|
-
* No changes.
|
110
|
+
* Skip Active Storage and Action Mailer if Active Job is skipped.
|
139
111
|
|
112
|
+
*Étienne Barrié*
|
140
113
|
|
141
|
-
|
114
|
+
* Correctly check if frameworks are disabled when running app:update.
|
142
115
|
|
143
|
-
*
|
116
|
+
*Étienne Barrié* and *Paulo Barros*
|
144
117
|
|
118
|
+
* Fixed `config.active_support.cache_format_version` never being applied.
|
145
119
|
|
146
|
-
|
120
|
+
Rails 7.0 shipped with a new serializer for Rails.cache, but the associated config
|
121
|
+
wasn't working properly. Note that even after this fix, it can only be applied from
|
122
|
+
the `application.rb` file.
|
147
123
|
|
148
|
-
*
|
124
|
+
*Alex Ghiculescu*
|
149
125
|
|
150
126
|
|
151
|
-
## Rails
|
127
|
+
## Rails 7.0.3.1 (July 12, 2022) ##
|
152
128
|
|
153
129
|
* No changes.
|
154
130
|
|
155
131
|
|
156
|
-
## Rails
|
157
|
-
|
158
|
-
* Allow spaces in path to Yarn binstub and only run on precompile if needed.
|
159
|
-
|
160
|
-
*Markus Doits*
|
132
|
+
## Rails 7.0.3 (May 09, 2022) ##
|
161
133
|
|
162
|
-
*
|
163
|
-
|
164
|
-
Fixes #40945.
|
165
|
-
|
166
|
-
*Jonathan Hefner*
|
134
|
+
* If reloading and eager loading are both enabled, after a reload Rails eager loads again the application code.
|
167
135
|
|
136
|
+
*Xavier Noria*
|
168
137
|
|
169
|
-
|
138
|
+
* Use `controller_class_path` in `Rails::Generators::NamedBase#route_url`
|
170
139
|
|
171
|
-
|
172
|
-
|
173
|
-
another process next to the Rails server. This is quite common in development
|
174
|
-
for instance to run the Webpack or the React server.
|
140
|
+
The `route_url` method now returns the correct path when generating
|
141
|
+
a namespaced controller with a top-level model using `--model-name`.
|
175
142
|
|
176
|
-
|
143
|
+
Previously, when running this command:
|
177
144
|
|
178
|
-
```
|
179
|
-
|
180
|
-
server do
|
181
|
-
WebpackServer.run
|
182
|
-
end
|
183
|
-
end
|
145
|
+
``` sh
|
146
|
+
bin/rails generate scaffold_controller Admin/Post --model-name Post
|
184
147
|
```
|
185
148
|
|
186
|
-
|
187
|
-
|
188
|
-
* Remove deprecated `rake dev:cache` tasks.
|
149
|
+
the comments above the controller action would look like:
|
189
150
|
|
190
|
-
|
151
|
+
``` ruby
|
152
|
+
# GET /posts
|
153
|
+
def index
|
154
|
+
@posts = Post.all
|
155
|
+
end
|
156
|
+
```
|
191
157
|
|
192
|
-
|
158
|
+
afterwards, they now look like this:
|
193
159
|
|
194
|
-
|
160
|
+
``` ruby
|
161
|
+
# GET /admin/posts
|
162
|
+
def index
|
163
|
+
@posts = Post.all
|
164
|
+
end
|
165
|
+
```
|
195
166
|
|
196
|
-
|
167
|
+
Fixes #44662.
|
197
168
|
|
198
|
-
*
|
169
|
+
*Andrew White*
|
199
170
|
|
200
|
-
|
171
|
+
## Rails 7.0.2.4 (April 26, 2022) ##
|
201
172
|
|
202
|
-
|
173
|
+
* No changes.
|
203
174
|
|
204
|
-
* Remove deprecated `server` argument from the rails server command.
|
205
175
|
|
206
|
-
|
176
|
+
## Rails 7.0.2.3 (March 08, 2022) ##
|
207
177
|
|
208
|
-
*
|
178
|
+
* No changes.
|
209
179
|
|
210
|
-
*Rafael Mendonça França*
|
211
180
|
|
212
|
-
|
181
|
+
## Rails 7.0.2.2 (February 11, 2022) ##
|
213
182
|
|
214
|
-
|
183
|
+
* No changes.
|
215
184
|
|
216
|
-
* Remove depreated `rake notes` tasks.
|
217
185
|
|
218
|
-
|
186
|
+
## Rails 7.0.2.1 (February 11, 2022) ##
|
219
187
|
|
220
|
-
*
|
188
|
+
* No changes.
|
221
189
|
|
222
|
-
Fixes #38998.
|
223
190
|
|
224
|
-
|
191
|
+
## Rails 7.0.2 (February 08, 2022) ##
|
225
192
|
|
226
|
-
*
|
193
|
+
* No changes.
|
227
194
|
|
228
|
-
`rails new` will now look for the default `railsrc` file at
|
229
|
-
`$XDG_CONFIG_HOME/rails/railsrc` (or `~/.config/rails/railsrc` if
|
230
|
-
`XDG_CONFIG_HOME` is not set). If this file does not exist, `rails new`
|
231
|
-
will fall back to `~/.railsrc`.
|
232
195
|
|
233
|
-
|
196
|
+
## Rails 7.0.1 (January 06, 2022) ##
|
234
197
|
|
235
|
-
|
198
|
+
* Prevent duplicate entries in plugin Gemfile.
|
236
199
|
|
237
|
-
*
|
238
|
-
identifiable information (PII) in production environments.
|
200
|
+
*Jonathan Hefner*
|
239
201
|
|
240
|
-
|
202
|
+
* Fix asset pipeline errors for plugin dummy apps.
|
241
203
|
|
242
|
-
*
|
204
|
+
*Jonathan Hefner*
|
243
205
|
|
244
|
-
|
206
|
+
* Fix generated route revocation.
|
245
207
|
|
246
|
-
|
208
|
+
*Jonathan Hefner*
|
247
209
|
|
248
|
-
|
249
|
-
|
250
|
-
```
|
210
|
+
* Addresses an issue in which Sidekiq jobs could not reload certain
|
211
|
+
namespaces.
|
251
212
|
|
252
|
-
|
213
|
+
See [fxn/zeitwerk#198](https://github.com/fxn/zeitwerk/issues/198) for
|
214
|
+
details.
|
253
215
|
|
254
|
-
|
255
|
-
class AnimalsRecord < ApplicationRecord
|
256
|
-
self.abstract_class = true
|
216
|
+
*Xavier Noria*
|
257
217
|
|
258
|
-
|
259
|
-
end
|
260
|
-
```
|
218
|
+
* Fix plugin generator to a plugin that pass all the tests.
|
261
219
|
|
262
|
-
|
220
|
+
*Rafael Mendonça França*
|
263
221
|
|
264
|
-
```ruby
|
265
|
-
class Pet < AnimalsRecord
|
266
|
-
end
|
267
|
-
```
|
268
222
|
|
269
|
-
|
223
|
+
## Rails 7.0.0 (December 15, 2021) ##
|
270
224
|
|
271
|
-
|
272
|
-
$ bin/rails generate scaffold Pet name:string --database=animals --parent=SecondaryBase
|
273
|
-
```
|
225
|
+
* No changes.
|
274
226
|
|
275
|
-
This will ensure the model inherits from the `SecondaryBase` parent instead of `AnimalsRecord`
|
276
227
|
|
277
|
-
|
278
|
-
class Pet < SecondaryBase
|
279
|
-
end
|
280
|
-
```
|
228
|
+
## Rails 7.0.0.rc3 (December 14, 2021) ##
|
281
229
|
|
282
|
-
|
230
|
+
* Allow localhost with a port by default in development
|
283
231
|
|
284
|
-
|
232
|
+
[Fixes: #43864]
|
285
233
|
|
286
|
-
|
234
|
+
## Rails 7.0.0.rc2 (December 14, 2021) ##
|
287
235
|
|
288
|
-
*
|
236
|
+
* No changes
|
289
237
|
|
290
|
-
|
238
|
+
## Rails 7.0.0.rc1 (December 06, 2021) ##
|
291
239
|
|
292
|
-
|
240
|
+
* Remove deprecated `config` in `dbconsole`.
|
293
241
|
|
294
|
-
|
295
|
-
- action_mailbox
|
296
|
-
- action_mailer
|
297
|
-
- action_text
|
298
|
-
- active_job
|
299
|
-
- active_storage
|
300
|
-
- bootsnap
|
301
|
-
- jbuilder
|
302
|
-
- spring
|
303
|
-
- system_tests
|
304
|
-
- turbolinks
|
305
|
-
- webpack
|
242
|
+
*Rafael Mendonça França*
|
306
243
|
|
307
|
-
|
244
|
+
* Change default `X-XSS-Protection` header to disable XSS auditor
|
308
245
|
|
309
|
-
|
310
|
-
|
246
|
+
This header has been deprecated and the XSS auditor it triggered
|
247
|
+
has been removed from all major modern browsers (in favour of
|
248
|
+
Content Security Policy) that implemented this header to begin with
|
249
|
+
(Firefox never did).
|
311
250
|
|
312
|
-
|
251
|
+
[OWASP](https://owasp.org/www-project-secure-headers/#x-xss-protection)
|
252
|
+
suggests setting this header to '0' to disable the default behaviour
|
253
|
+
on old browsers as it can introduce additional security issues.
|
313
254
|
|
314
|
-
|
255
|
+
Added the new behaviour as a framework default from Rails 7.0.
|
315
256
|
|
316
|
-
*
|
317
|
-
during application boot in a safe way.
|
257
|
+
*Christian Sutter*
|
318
258
|
|
319
|
-
|
259
|
+
* Scaffolds now use date_field, time_field and datetime_field instead of
|
260
|
+
date_select, time_select and datetime_select; thus providing native date/time pickers.
|
320
261
|
|
321
|
-
*
|
262
|
+
*Martijn Lafeber*
|
322
263
|
|
323
|
-
|
264
|
+
* Fix a regression in which autoload paths were initialized too late.
|
324
265
|
|
325
266
|
*Xavier Noria*
|
326
267
|
|
327
|
-
|
328
|
-
|
329
|
-
This runs all test files in the test directory, including system tests.
|
330
|
-
|
331
|
-
*Niklas Häusele*
|
332
|
-
|
333
|
-
* Add `config.generators.after_generate` for processing to generated files.
|
334
|
-
|
335
|
-
Register a callback that will get called right after generators has finished.
|
268
|
+
## Rails 7.0.0.alpha2 (September 15, 2021) ##
|
336
269
|
|
337
|
-
|
270
|
+
* Fix activestorage dependency in the npm package.
|
338
271
|
|
339
|
-
*
|
340
|
-
|
341
|
-
This makes test file patterns configurable via two environment variables:
|
342
|
-
`DEFAULT_TEST`, to configure files to test, and `DEFAULT_TEST_EXCLUDE`,
|
343
|
-
to configure files to exclude from testing.
|
272
|
+
*Rafael Mendonça França*
|
344
273
|
|
345
|
-
|
346
|
-
new categories of tests that should not be executed by default (e.g:
|
347
|
-
smoke tests).
|
274
|
+
## Rails 7.0.0.alpha1 (September 15, 2021) ##
|
348
275
|
|
349
|
-
|
276
|
+
* New and upgraded Rails apps no longer generate `config/initializers/application_controller_renderer.rb`
|
277
|
+
or `config/initializers/cookies_serializer.rb`
|
350
278
|
|
351
|
-
|
279
|
+
The default value for `cookies_serializer` (`:json`) has been moved to `config.load_defaults("7.0")`.
|
280
|
+
The new framework defaults file can be used to upgrade the serializer.
|
352
281
|
|
353
|
-
|
282
|
+
*Alex Ghiculescu*
|
354
283
|
|
355
|
-
|
284
|
+
* New applications get a dependency on the new `debug` gem, replacing `byebug`.
|
356
285
|
|
357
|
-
*
|
286
|
+
*Xavier Noria*
|
358
287
|
|
359
|
-
|
288
|
+
* Add SSL support for postgresql in `bin/rails dbconsole`.
|
360
289
|
|
361
|
-
|
290
|
+
Fixes #43114.
|
362
291
|
|
363
|
-
|
364
|
-
It's enabled by default in development environment, but can be enabled in production as well.
|
365
|
-
See the gem [README](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md) for information on how to enable it in production.
|
292
|
+
*Michael Bayucot*
|
366
293
|
|
367
|
-
|
294
|
+
* Add support for comments above gem declaration in Rails application templates, e.g. `gem("nokogiri", comment: "For XML")`.
|
368
295
|
|
369
|
-
*
|
296
|
+
*Linas Juškevičius*
|
370
297
|
|
371
|
-
|
298
|
+
* The setter `config.autoloader=` has been deleted. `zeitwerk` is the only
|
299
|
+
available autoloading mode.
|
372
300
|
|
373
|
-
*
|
301
|
+
*Xavier Noria*
|
374
302
|
|
375
|
-
|
303
|
+
* `config.autoload_once_paths` can be configured in the body of the
|
304
|
+
application class defined in `config/application.rb` or in the configuration
|
305
|
+
for environments in `config/environments/*`.
|
376
306
|
|
377
|
-
|
307
|
+
Similarly, engines can configure that collection in the class body of the
|
308
|
+
engine class or in the configuration for environments.
|
378
309
|
|
379
|
-
|
310
|
+
After that, the collection is frozen, and you can autoload from those paths.
|
311
|
+
They are managed by the `Rails.autoloaders.once` autoloader, which does not
|
312
|
+
reload, only autoloads/eager loads.
|
380
313
|
|
381
|
-
|
314
|
+
*Xavier Noria*
|
382
315
|
|
383
|
-
|
316
|
+
* During initialization, you cannot autoload reloadable classes or modules
|
317
|
+
like application models, unless they are wrapped in a `to_prepare` block.
|
318
|
+
For example, from `config/initializers/*`, or in application, engines, or
|
319
|
+
railties initializers.
|
384
320
|
|
385
|
-
|
386
|
-
|
321
|
+
Please check the [autoloading
|
322
|
+
guide](https://guides.rubyonrails.org/v7.0/autoloading_and_reloading_constants.html#autoloading-when-the-application-boots)
|
323
|
+
for details.
|
387
324
|
|
388
|
-
|
389
|
-
`ruby script/benchmarks/opt_compare.rb`
|
325
|
+
*Xavier Noria*
|
390
326
|
|
391
|
-
|
327
|
+
* While they are allowed to have elements in common, it is no longer required
|
328
|
+
that `config.autoload_once_paths` is a subset of `config.autoload_paths`.
|
329
|
+
The former are managed by the `once` autoloader. The `main` autoloader
|
330
|
+
manages the latter minus the former.
|
392
331
|
|
393
|
-
*
|
332
|
+
*Xavier Noria*
|
394
333
|
|
395
|
-
|
396
|
-
disabled in `environments/test.rb`. This implicitly disables caching
|
397
|
-
view templates too. This change will enable view template caching by
|
398
|
-
adding this to the generated `environments/test.rb`:
|
334
|
+
* Show Rake task description if command is run with `-h`.
|
399
335
|
|
400
|
-
|
401
|
-
|
402
|
-
```
|
336
|
+
Adding `-h` (or `--help`) to a Rails command that's a Rake task now outputs
|
337
|
+
the task description instead of the general Rake help.
|
403
338
|
|
404
|
-
*
|
339
|
+
*Petrik de Heus*
|
405
340
|
|
406
|
-
*
|
341
|
+
* Add missing `plugin new` command to help.
|
407
342
|
|
408
|
-
|
409
|
-
move it from one place to another in the stack:
|
343
|
+
*Petrik de Heus
|
410
344
|
|
411
|
-
|
412
|
-
config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns
|
413
|
-
```
|
345
|
+
* Fix `config_for` error when there's only a shared root array.
|
414
346
|
|
415
|
-
|
416
|
-
`ActionDispatch::Flash`. You can also move it after with:
|
347
|
+
*Loïc Delmaire*
|
417
348
|
|
418
|
-
|
419
|
-
config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns
|
420
|
-
```
|
349
|
+
* Raise an error in generators if an index type is invalid.
|
421
350
|
|
422
|
-
*
|
351
|
+
*Petrik de Heus*
|
423
352
|
|
424
|
-
*
|
353
|
+
* `package.json` now uses a strict version constraint for Rails JavaScript packages on new Rails apps.
|
425
354
|
|
426
|
-
*
|
355
|
+
*Zachary Scott*, *Alex Ghiculescu*
|
427
356
|
|
428
|
-
*
|
357
|
+
* Modified scaffold generator template so that running
|
358
|
+
`rails g scaffold Author` no longer generates tests called "creating
|
359
|
+
a Author", "updating a Author", and "destroying a Author".
|
429
360
|
|
430
|
-
|
361
|
+
Fixes #40744.
|
431
362
|
|
432
|
-
|
363
|
+
*Michael Duchemin*
|
433
364
|
|
434
|
-
|
365
|
+
* Raise an error in generators if a field type is invalid.
|
435
366
|
|
436
|
-
*
|
367
|
+
*Petrik de Heus*
|
437
368
|
|
438
|
-
|
369
|
+
* `bin/rails tmp:clear` deletes also files and directories in `tmp/storage`.
|
439
370
|
|
440
|
-
|
441
|
-
config.generators do |g|
|
442
|
-
g.orm :active_record, primary_key_type: :uuid
|
443
|
-
end
|
444
|
-
```
|
371
|
+
*George Claghorn*
|
445
372
|
|
446
|
-
|
373
|
+
* Fix compatibility with `psych >= 4`.
|
447
374
|
|
448
|
-
|
449
|
-
|
450
|
-
```
|
375
|
+
Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
|
376
|
+
`Rails.application.config_for` now uses `YAML.unsafe_load` if available.
|
451
377
|
|
452
|
-
|
453
|
-
This change causes the type to be applied appropriately.
|
378
|
+
*Jean Boussier*
|
454
379
|
|
455
|
-
|
380
|
+
* Allow loading nested locales in engines.
|
456
381
|
|
457
|
-
*
|
382
|
+
*Gannon McGibbon*
|
458
383
|
|
459
|
-
|
384
|
+
* Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
|
460
385
|
|
461
|
-
*
|
386
|
+
*Jean Boussier*
|
462
387
|
|
463
|
-
* `
|
388
|
+
* Remove `Rack::Runtime` from the default middleware stack and deprecate
|
389
|
+
referencing it in middleware operations without adding it back.
|
464
390
|
|
465
|
-
|
466
|
-
# config/example.yml
|
467
|
-
shared:
|
468
|
-
foo:
|
469
|
-
bar:
|
470
|
-
baz: 1
|
471
|
-
development:
|
472
|
-
foo:
|
473
|
-
bar:
|
474
|
-
qux: 2
|
475
|
-
```
|
391
|
+
*Hartley McGuire*
|
476
392
|
|
477
|
-
|
478
|
-
# Previously
|
479
|
-
Rails.application.config_for(:example)[:foo][:bar] #=> { qux: 2 }
|
393
|
+
* Allow adding additional authorized hosts in development via `ENV['RAILS_DEVELOPMENT_HOSTS']`.
|
480
394
|
|
481
|
-
|
482
|
-
Rails.application.config_for(:example)[:foo][:bar] #=> { baz: 1, qux: 2 }
|
483
|
-
```
|
395
|
+
*Josh Abernathy*, *Debbie Milburn*
|
484
396
|
|
485
|
-
|
397
|
+
* Add app concern and test keepfiles to generated engine plugins.
|
486
398
|
|
487
|
-
*
|
399
|
+
*Gannon McGibbon*
|
488
400
|
|
489
|
-
|
490
|
-
# config/example.yml
|
491
|
-
development:
|
492
|
-
options:
|
493
|
-
key: value
|
494
|
-
```
|
401
|
+
* Stop generating a license for in-app plugins.
|
495
402
|
|
496
|
-
|
497
|
-
Rails.application.config_for(:example).options
|
498
|
-
```
|
403
|
+
*Gannon McGibbon*
|
499
404
|
|
500
|
-
|
405
|
+
* `rails app:update` no longer prompts you to overwrite files that are generally modified in the
|
406
|
+
course of developing a Rails app. See [#41083](https://github.com/rails/rails/pull/41083) for
|
407
|
+
the full list of changes.
|
501
408
|
|
502
|
-
|
409
|
+
*Alex Ghiculescu*
|
503
410
|
|
504
|
-
*
|
505
|
-
now able to modify `autoload_paths`, `autoload_once_paths`, and
|
506
|
-
`eager_load_paths`.
|
411
|
+
* Change default branch for new Rails projects and plugins to `main`.
|
507
412
|
|
508
|
-
|
413
|
+
*Prateek Choudhary*
|
509
414
|
|
510
|
-
|
415
|
+
* The new method `Rails.benchmark` gives you a quick way to measure and log the execution time taken by a block:
|
511
416
|
|
512
|
-
|
417
|
+
def test_expensive_stuff
|
418
|
+
Rails.benchmark("test_expensive_stuff") { ... }
|
419
|
+
end
|
513
420
|
|
514
|
-
|
515
|
-
# In config/application.rb, for example.
|
516
|
-
require "#{Rails.root}/lib/my_app/config"
|
421
|
+
This functionality was available in some contexts only before.
|
517
422
|
|
518
|
-
|
519
|
-
config.foo = MyApp::Config.foo
|
520
|
-
```
|
423
|
+
*Simon Perepelitsa*
|
521
424
|
|
522
|
-
|
425
|
+
* Applications generated with `--skip-sprockets` no longer get `app/assets/config/manifest.js` and `app/assets/stylesheets/application.css`.
|
523
426
|
|
524
|
-
|
525
|
-
config.to_prepare do
|
526
|
-
config.foo = MyModel.foo
|
527
|
-
end
|
528
|
-
```
|
427
|
+
*Cindy Gao*
|
529
428
|
|
530
|
-
|
429
|
+
* Add support for stylesheets and ERB views to `rails stats`.
|
531
430
|
|
532
|
-
*
|
431
|
+
*Joel Hawksley*
|
533
432
|
|
534
|
-
*
|
433
|
+
* Allow appended root routes to take precedence over internal welcome controller.
|
535
434
|
|
536
|
-
*
|
435
|
+
*Gannon McGibbon*
|
537
436
|
|
538
437
|
|
539
|
-
Please check [6-
|
438
|
+
Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/railties/CHANGELOG.md) for previous changes.
|