diff --git a/Gemfile b/Gemfile
index 9fea571b..7242b4dc 100644
--- a/Gemfile
+++ b/Gemfile
@@ -88,6 +88,8 @@ gem 'discordrb'
# Smarts
gem 'word_count_analyzer'
+gem 'will_paginate', '~> 4.0'
+
# Workers
gem 'sidekiq'
gem 'redis'
diff --git a/Gemfile.lock b/Gemfile.lock
index df905df4..83233ed7 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1682,6 +1682,7 @@ GEM
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
+ will_paginate (4.0.1)
word_count_analyzer (1.0.1)
engtagger
zeitwerk (2.6.16)
@@ -1760,6 +1761,7 @@ DEPENDENCIES
uglifier (>= 1.3.0)
web-console
webpacker
+ will_paginate (~> 4.0)
word_count_analyzer
RUBY VERSION
diff --git a/app/views/document_revisions/index.html.erb b/app/views/document_revisions/index.html.erb
index 5a097563..8ca80ed2 100644
--- a/app/views/document_revisions/index.html.erb
+++ b/app/views/document_revisions/index.html.erb
@@ -10,6 +10,7 @@
| Title |
Backed up |
+ Word Count |
Actions |
@@ -18,13 +19,14 @@
| <%= @document.title %> |
Latest version |
+ <%= @document.cached_word_count %> |
<%= link_to 'Edit document', edit_document_path(@document), class: 'btn' %> |
<% @document_revisions.each do |document_revision| %>
| <%= document_revision.title %> |
<%= time_ago_in_words document_revision.created_at %> ago |
-
+ | <%= document_revision.cached_word_count %> |
<%= link_to 'View', document_document_revision_path(id: document_revision.id), class: 'btn' %>
<%= link_to 'Delete', document_document_revision_path(document: @document, id: document_revision.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn red lighten-5 red-text' %>
diff --git a/db/schema.rb b/db/schema.rb
index 974213c0..140c02de 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1938,6 +1938,7 @@ ActiveRecord::Schema.define(version: 2023_05_12_222601) do
t.string "name", null: false
t.string "type_of"
t.text "description"
+ t.string "map"
t.string "population"
t.string "language"
t.string "currency"