Sha256: 5c0163a8011e9a975a3a2322407e40b656561727b4a39782a0940236c5cd136d
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
# -*- encoding : utf-8 -*- class Card; module Set; module All; module Observer; extend Card::Set # ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/all/observer.rb ~~~~~~~~~~~ def send_action_mails args setting = "on_#{args[:on]}".to_sym email_templates_for( setting ) do |mailcard| mailcard.deliver( context: self ) end end def email_templates_for setting if (email_templates = @email_template_cache || ((event_card = self.rule_card(setting)) && event_card.extended_item_cards)) email_templates.each do |mailcard| yield(mailcard) end end end [:create, :update, :delete].each do |action| event "observer_#{action}".to_sym, after: :extend, on: action do self.send_action_mails on: action end end event :cache_delete_email_templates, after: :approve, on: :delete do event_card = self.rule_card(:on_delete) @email_template_cache = event_card && event_card.extended_item_cards end # ~~~~~~~~~~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/05_email/set/all/observer.rb ~~~~~~~~~~~ end;end;end;end;
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
card-1.16.9 | tmpsets/set/mod006-05_email/all/observer.rb |
card-1.16.8 | tmpsets/set/mod006-05_email/all/observer.rb |
card-1.16.7 | tmpsets/set/mod006-05_email/all/observer.rb |