small fix for cache

This commit is contained in:
Harry Bomrah 2015-03-25 22:08:30 +08:00
parent 1a0d257055
commit 5cdd1d11e9
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