mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-08 15:50:08 +09:00
Compose sidebar lists from existing room scopes
Directs merge Room.directs and order by recency. Shared rooms reuse with_ordered_room and without_direct_rooms, with the STI filter coming from Room.without_directs so the join alias stays rooms. Co-authored-by: Thomas Klemm <github@tklemm.eu>
This commit is contained in:
@@ -4,7 +4,7 @@ class Users::SidebarsController < ApplicationController
|
||||
def show
|
||||
visible_memberships = Current.user.memberships.visible
|
||||
@direct_memberships = visible_memberships.with_direct_rooms
|
||||
@other_memberships = visible_memberships.with_ordered_shared_rooms
|
||||
@other_memberships = visible_memberships.with_ordered_room.without_direct_rooms
|
||||
|
||||
@direct_placeholder_users = find_direct_placeholder_users
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user