我想显示组合来自多个查询的信息的数据。例如:
@projects = @company.projects
@assignments = @company.assignments
@tasks = @company.tasks
如何获取这三个查询并显示一个显示项目、分配和任务的大表,所有这些都按 排序created_at
?所需的结果将如下所示:
7/11 Task created by company Xc for project Xp.
7/10 Project Xp created by User U.
7/09 Task created by company Yc for project Yp.
7/09 Assignment created by company Yc for project Yp.
7/08 Project Yp created by user U.