module Fragmentary::Fragment::ClassMethods::record_type_subscription

Set a callback on the eigenclass of an individual subscription to clean up client fragments corresponding to a destroyed AR record. Note that this assumes that ALL fragments of a class that calls this method should be removed if those fragments have a record_id matching the id of the destroyed AR record. Also note that the call 'subscriber.subscriptions' above ensures that the subscription exists even if the particular fragment subclass doesn't explicitly subscribe to the record_type AR class. And note that if the fragment subclass does subscribe to the record_type class, the callback doesn't affect the execution of any delete handler defined by the fragment.