鉴于以下型号:查询到基于嵌套资源收益模型X Y
Thread (id, title, timestamps)
ThreadParticipant (id, thread_id, user_id, read(boolean), timestamps)
Comment (id, thread_id, user_id)
如何查询来构建它返回:所有线程获取最新的主题评论(Thread.comment.first )等于current_user?
...返回线程最后一个comment.user_id == current_user.id?
想法?
让我知道,如果问题是令人困惑 – AnApprentice 2011-05-15 20:52:06