small fix for cache

This commit is contained in:
Harry Bomrah 2015-03-25 22:08:30 +08:00
parent 8b2281ca17
commit 27222ab6cd
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class OrbitObserver < Mongoid::Observer
when 'Category'
Rails.cache.delete_matched( /#{ document.module_app.key }/ )
else
Rails.cache.delete_matched( /#{model_module_hash[document.name.underscore.to_sym]}/ )
Rails.cache.delete_matched( /#{model_module_hash[document.class.name.underscore.to_sym]}/ )
end
end
end