Sha256: 851c4fcc6690e98d5a9d7606d4734b78494f18aa248d1391ab77a40ab6edab34
Contents?: true
Size: 706 Bytes
Versions: 10
Compression:
Stored size: 706 Bytes
Contents
class CirculationSweeper < ActionController::Caching::Sweeper observe Basket, Checkin, Checkout, Reserve include ExpireEditableFragment def after_save(record) case when record.is_a?(Basket) record.checkouts.each do |checkout| expire_editable_fragment(checkout.item) expire_editable_fragment(checkout.item.manifestation) end when record.is_a?(Checkin) expire_editable_fragment(record.item.manifestation) when record.is_a?(Checkout) expire_editable_fragment(record.item.manifestation) when record.is_a?(Reserve) expire_editable_fragment(record.manifestation) end end def after_destroy(record) after_save(record) end end
Version data entries
10 entries across 10 versions & 1 rubygems