module WarpEngine::ShelfRefreshing
Model concern that keeps the shelves (WarpEngine::Shelves) in step with the catalog: after every commit, soft delete and restore it refreshes the shelves of the recordโs platform. The including model overrides the private shelf_platform to name that platform; nil (the default) refreshes every shelf. Does nothing when the host keeps no shelves.
Public Instance Methods
Source
# File app/models/concerns/warp_engine/shelf_refreshing.rb, line 22 def restore! super.tap { refresh_shelves } end
Restores the record (see WarpEngine::SoftDeletable#restore!), then refreshes the shelves. Returns what the restore returned.
Calls superclass method
Source
# File app/models/concerns/warp_engine/shelf_refreshing.rb, line 16 def soft_delete! super.tap { refresh_shelves } end
Soft-deletes the record (see WarpEngine::SoftDeletable#soft_delete!), then refreshes the shelves. Returns what the soft delete returned.
Calls superclass method