We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad046ca commit 4ce8294Copy full SHA for 4ce8294
1 file changed
app/views/posts/_expanded.html.erb
@@ -326,11 +326,7 @@
326
<i class="fa fa-wrench"></i>
327
Tools
328
</a>
329
- <% flags_count = if current_user&.at_least_moderator?
330
- post.flags
331
- else
332
- post.flags.not_confidential
333
- end.where(handled_by_id: nil).count %>
+ <% flags_count = Flag.accessible_to(current_user, post).where(handled_by_id: nil).count %>
334
335
<% own_flags_count = if current_user&.at_least_moderator?
336
0
0 commit comments