Move to constant, whitespace

This commit is contained in:
Jason Zimdars
2025-09-12 15:33:09 -05:00
parent 4579f759c9
commit f0a2d50195
+7 -5
View File
@@ -1,4 +1,6 @@
module AccessesHelper
MAX_DISPLAYED_WATCHERS = 8
def access_menu_tag(collection, **options, &)
tag.menu class: [ options[:class], { "toggler--toggled": collection.all_access? } ], data: {
controller: "filter toggle-class navigable-list",
@@ -26,12 +28,12 @@ module AccessesHelper
def collection_watchers_list(collection)
watchers = collection.users
.without(User.system)
.where(accesses: { involvement: :watching })
.distinct
.without(User.system)
.where(accesses: { involvement: :watching })
.distinct
displayed_watchers = watchers.limit(8)
overflow_count = watchers.count - 8
displayed_watchers = watchers.limit(MAX_DISPLAYED_WATCHERS)
overflow_count = watchers.count - MAX_DISPLAYED_WATCHERS
tag.div(class: "flex gap-half justify-center") do
safe_join([