Fix mentionable reference extraction caching.
This commit is contained in:
parent
cf19efec3a
commit
37ce5f312e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue