Sha256: 9099824b8bf25b001f9fbda24a754a46b8d38ae21f64189931243f5d57277a88
Contents?: true
Size: 763 Bytes
Versions: 11
Compression:
Stored size: 763 Bytes
Contents
class CirculationSweeper < ActionController::Caching::Sweeper observe Basket, Checkin, Checkout include ExpireEditableFragment def after_save(record) case when record.is_a?(Basket) record.checkouts.each do |checkout| expire_editable_fragment(checkout.item, ['detail']) expire_editable_fragment(checkout.item.manifestation, ['holding', 'show_list'], ['html', 'mobile']) end when record.is_a?(Checkin) expire_editable_fragment(record.item.manifestation, ['holding', 'show_list'], ['html', 'mobile']) when record.is_a?(Checkout) expire_editable_fragment(record.item.manifestation, ['holding', 'show_list'], ['html', 'mobile']) end end def after_destroy(record) after_save(record) end end
Version data entries
11 entries across 11 versions & 1 rubygems