Fix mentionable reference extraction caching.

This commit is contained in:
Douwe Maan 2016-01-06 13:33:11 +01:00
parent cf19efec3a
commit 37ce5f312e
1 changed files with 5 additions and 2 deletions

View File

@ -51,8 +51,11 @@ module Mentionable
else
self.class.mentionable_attrs.each do |attr, options|
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