Display title with an * when status is draft in version chooser

This commit is contained in:
Amaia Castro
2017-01-04 12:13:19 +01:00
parent c935373c07
commit 375602d297
4 changed files with 8 additions and 4 deletions

View File

@@ -21,4 +21,8 @@ class Legislation::DraftVersion < ActiveRecord::Base
self.body_html = Redcarpet::Markdown.new(renderer).render(body)
self.toc_html = Redcarpet::Markdown.new(toc_renderer).render(body)
end
def display_title
status == 'draft' ? "#{title} *" : title
end
end