diff options
Diffstat (limited to 'engines/support/lib')
-rw-r--r-- | engines/support/lib/account_extension/tickets.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/support/lib/account_extension/tickets.rb b/engines/support/lib/account_extension/tickets.rb new file mode 100644 index 0000000..63f4873 --- /dev/null +++ b/engines/support/lib/account_extension/tickets.rb @@ -0,0 +1,15 @@ +module AccountExtension + module Tickets + extend ActiveSupport::Concern + + def destroy_with_tickets(destroy_identities=false) + Ticket.destroy_all_from(self.user) + destroy_without_tickets(destroy_identities) + end + + included do + alias_method_chain :destroy, :tickets + end + + end +end |