Commit 37ce5f31 authored by Douwe Maan's avatar Douwe Maan

Fix mentionable reference extraction caching.

parent cf19efec
...@@ -51,8 +51,11 @@ module Mentionable ...@@ -51,8 +51,11 @@ module Mentionable
else else
self.class.mentionable_attrs.each do |attr, options| self.class.mentionable_attrs.each do |attr, options|
text = send(attr) text = send(attr)
options[:cache_key] = [self, attr] if options.delete(:cache) && self.persisted?
ext.analyze(text, options) context = options.dup
context[:cache_key] = [self, attr] if context.delete(:cache) && self.persisted?
ext.analyze(text, context)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment