Add optional: true to the Snapshot belongs_to :user relationship.
Also added ActiveRecord model-level config option belongs_to_required_by_default to ensure belongs_to validations are enforced because Rails was ignoring the application config for config.active_record.belongs_to_required_by_default. See here for more details, https://github.com/rails/rails/pull/46047 (may be additional action items somewhere after that PR is merged)
Add
optional: true
to the Snapshotbelongs_to :user
relationship.Also added ActiveRecord model-level config option
belongs_to_required_by_default
to ensure belongs_to validations are enforced because Rails was ignoring the application config forconfig.active_record.belongs_to_required_by_default
. See here for more details, https://github.com/rails/rails/pull/46047 (may be additional action items somewhere after that PR is merged)