Skip to content

Commit cf73e0f

Browse files
committed
Set 'true' to: config.active_record.belongs_to_required_by_default
1 parent 3cd68f6 commit cf73e0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Application < Rails::Application
3636
# TODO: The following config should be switched to its default value `true`, but not urgent.
3737
# Rails 5.0: Require `belongs_to` associations by default. Previous versions had false.
3838
# https://railsguides.jp/configuring.html#config-active-record-belongs-to-required-by-default
39-
config.active_record.belongs_to_required_by_default = false
39+
config.active_record.belongs_to_required_by_default = true
4040

4141
# Rails 8.0: `to_time` will always preserve the full timezone in Rails 8.1.
4242
config.active_support.to_time_preserves_timezone = :zone

0 commit comments

Comments
 (0)