db_belongs_to :company, optional: true
gives a validation error:
ActiveRecord::RecordInvalid: Validation failed: Company must exist
on empty value (company_id=nil), although
belongs_to :company, optional: true
in the same situation does not give an error
db_belongs_to :company, optional: true
gives a validation error: ActiveRecord::RecordInvalid: Validation failed: Company must exist on empty value (company_id=nil), althoughbelongs_to :company, optional: true
in the same situation does not give an error