forked from OpenNeo/impress
3ea22e6977
Again I'm just not convinced of the perf on this, and it enables us to delete some whole infra over it, we can improve it another time if it's useful to!
9 lines
217 B
Ruby
9 lines
217 B
Ruby
class ItemObserver < ActionController::Caching::Sweeper
|
|
def after_create(item)
|
|
Resque.enqueue(Item::CreateTask, item.id)
|
|
end
|
|
|
|
def after_destroy(item)
|
|
Resque.enqueue(Item::DestroyTask, item.id)
|
|
end
|
|
end
|