railsのコードを読んでいたときに目にしたのでメモ。 rails - belongs_to should default to required: true #18233 Add config/initializers/active_record_belongs_to_required_by_default.rb Newly generated Rails apps have a new initializer called active_record_belongs_to_required_by_default.rb which sets the value of the configuration option config.active_record.belongs_to_requred_by_default to true when ActiveRecord is not ski