Add draft versions comments count to admin views

This commit is contained in:
Amaia Castro
2017-03-10 12:10:28 +01:00
parent 5e6d80f7a3
commit 7d118a0c27
3 changed files with 6 additions and 2 deletions

View File

@@ -26,4 +26,8 @@ class Legislation::DraftVersion < ActiveRecord::Base
def display_title
status == 'draft' ? "#{title} *" : title
end
def total_comments
annotations.sum(:comments_count)
end
end