1
0
Fork 0
forked from OpenNeo/impress
impress/app/models/item_observer.rb

10 lines
217 B
Ruby
Raw Normal View History

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