Skip to content

Commit f17f2d1

Browse files
committed
Set secret_key_base to avoid generation of temp files
Since rails#53642 some report templates have been generating local_secret.txt because config.secret_key_base has not been set. This commit sets config.secret_keybase for these templates in the same manner as the other templates to prevent this from happening.
1 parent 8e7627a commit f17f2d1

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

guides/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
* Ensure all bug report templates set `config.secret_key_base` to avoid
2+
generation of `tmp/local_secret.txt` files when running the report template.
3+
4+
*Andrew White*
15

26
Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/guides/CHANGELOG.md) for previous changes.

guides/bug_report_templates/action_view.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TestApp < Rails::Application
1818
config.load_defaults Rails::VERSION::STRING.to_f
1919
config.eager_load = false
2020
config.logger = Logger.new($stdout)
21+
config.secret_key_base = "secret_key_base"
2122
end
2223
Rails.application.initialize!
2324

guides/bug_report_templates/active_record.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TestApp < Rails::Application
2222
config.load_defaults Rails::VERSION::STRING.to_f
2323
config.eager_load = false
2424
config.logger = Logger.new($stdout)
25+
config.secret_key_base = "secret_key_base"
2526
end
2627
Rails.application.initialize!
2728

guides/bug_report_templates/active_record_migrations.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TestApp < Rails::Application
2222
config.load_defaults Rails::VERSION::STRING.to_f
2323
config.eager_load = false
2424
config.logger = Logger.new($stdout)
25+
config.secret_key_base = "secret_key_base"
2526
end
2627
Rails.application.initialize!
2728

0 commit comments

Comments
 (0)