Move relevant methods from Title to Entry

This commit is contained in:
Alex Ling
2020-06-13 15:54:55 +00:00
parent c8be2849b9
commit 9302601307
4 changed files with 76 additions and 94 deletions
+1 -3
View File
@@ -53,9 +53,7 @@ class MainRouter < Router
begin
title = (@context.library.get_title env.params.url["title"]).not_nil!
username = get_username env
percentage = title.entries.map { |e|
title.load_percentage username, e.title
}
percentage = title.entries.map &.load_percentage username
title_percentage = title.titles.map &.load_percentage username
layout "title"
rescue e