mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
more accurate sidebar counts
This commit is contained in:
parent
1d2ea3a3bd
commit
ae97e7a9f6
@ -84,12 +84,11 @@
|
||||
if content_type != Universe && @universe_scope
|
||||
@universe_scope.send(pluralized_name).count
|
||||
else
|
||||
# (
|
||||
# current_user.send(pluralized_name) +
|
||||
# current_user.send("contributable_#{pluralized_name}") +
|
||||
# (content_type == Universe ? [] : content_type.where(universe_id: current_user.universes.pluck(:id)))
|
||||
# ).uniq.count
|
||||
current_user.send(pluralized_name).count
|
||||
(
|
||||
current_user.send(pluralized_name) +
|
||||
current_user.send("contributable_#{pluralized_name}") +
|
||||
(content_type == Universe ? [] : content_type.where(universe_id: current_user.universes.pluck(:id)))
|
||||
).uniq.count
|
||||
end
|
||||
%>
|
||||
</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user