mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-24 20:16:08 +10:00
Only cache markdown when object has been saved and has a proper cache_key.
This commit is contained in:
@@ -51,7 +51,7 @@ module Mentionable
|
||||
else
|
||||
self.class.mentionable_attrs.each do |attr, options|
|
||||
text = send(attr)
|
||||
options[:cache_key] = [self, attr] if options.delete(:cache)
|
||||
options[:cache_key] = [self, attr] if options.delete(:cache) && self.persisted?
|
||||
ext.analyze(text, options)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user