Sha256: 8f894c05b3387ed0245ede85e65d575e1a97a256a283136ed426ad818b89ffb6
Contents?: true
Size: 463 Bytes
Versions: 5
Compression:
Stored size: 463 Bytes
Contents
module MailyHerald module ModelExtensions def self.included(base) unloadable base.class_eval do has_many :maily_herald_subscriptions, as: :entity, class_name: "MailyHerald::Subscription", dependent: :destroy has_many :maily_herald_logs, as: :entity, class_name: "MailyHerald::Log" after_destroy do self.maily_herald_logs.scheduled.destroy_all end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems