Sha256: f1e5dccf72cd7f3f8a8bc5c574603dd35c4a8e554bf44ae7c66b128c8b8062e8
Contents?: true
Size: 551 Bytes
Versions: 21
Compression:
Stored size: 551 Bytes
Contents
%i[create update delete].each do |action| event "observer_#{action}".to_sym, :integrate, on: action do execute_card_events on: action end end event :cache_delete_card_events, :store, on: :delete do @card_event_cache = event_cards :on_delete end def execute_card_events args setting = "on_#{args[:on]}".to_sym event_cards(setting).each do |event_card| event_card.deliver(context: self) end end def event_cards setting @card_event_cache || ((event_rule = rule_card(setting)) && event_rule.extended_item_cards) || [] end
Version data entries
21 entries across 21 versions & 1 rubygems