minor qa polish

This commit is contained in:
drusepth 2022-12-03 17:26:06 -08:00
parent 6e5ce5b935
commit 193c1a5bf3
2 changed files with 6 additions and 2 deletions

View File

@ -57,4 +57,8 @@ class Timeline < ApplicationRecord
def initialize_first_event
timeline_events.create(title: "Untitled Event", position: 1)
end
def cached_word_count
0 # until we implement it :)
end
end

View File

@ -411,7 +411,7 @@
</h2>
<p class="mt-4 text-xs tracking-wider font-bold text-gray-500">
Showing <%= pluralize content.count, 'pages' %>
Showing <%= pluralize content.count, 'page' %>
</p>
<ul class="mt-1 text-gray-600">
<% content_counts_per_type.each do |content_type, count| %>
@ -532,7 +532,7 @@
<div class="inline-block mr-4">
<i class="material-icons float-left mr-1 <%= DocumentAnalysis.text_color %>">spellcheck</i>
<% total_word_count = content.map(&:cached_word_count).sum %>
<% total_word_count = content.map(&:cached_word_count).reject(&:nil?).sum %>
<span class="text-sm">
<strong class="font-bold text-gray-700"><%= number_with_delimiter total_word_count %></strong>
<%= 'total word'.pluralize(total_word_count) %>