summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2016-10-06 22:52:44 +0100
committerNick Thomas <nick@gitlab.com>2016-10-07 02:54:26 +0100
commit109816c42fbe44fca108b52308a5fa4366876216 (patch)
tree10486c0d12d5cbd788395938b012bf15b6052de5 /app/models/note.rb
parente94cd6fdfe43d9128d37a539cf84f4388c5cf970 (diff)
downloadgitlab-ce-109816c42fbe44fca108b52308a5fa4366876216.tar.gz
Use CacheMarkdownField for notes
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index f2656df028b..2d644b03e4d 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -6,10 +6,13 @@ class Note < ActiveRecord::Base
include Awardable
include Importable
include FasterCacheKeys
+ include CacheMarkdownField
+
+ cache_markdown_field :note, pipeline: :note
# Attribute containing rendered and redacted Markdown as generated by
# Banzai::ObjectRenderer.
- attr_accessor :note_html
+ attr_accessor :redacted_note_html
# An Array containing the number of visible references as generated by
# Banzai::ObjectRenderer