.joins("LEFT OUTER JOIN supporting_document_files ON supporting_document_files.supportable_id = users.id AND supporting_document_files.supportable_type = 'User' LEFT OUTER JOIN supporting_document_types ON supporting_document_types.id = supporting_document_files.supporting_document_type_id LEFT OUTER JOIN supporting_document_types_groups ON supporting_document_types_groups.supporting_document_type_id = supporting_document_types.id LEFT OUTER JOIN groups ON groups.id = supporting_document_types_groups.group_id")