Class: FatFreeCRM::Cloudfuji::EventObservers::EventRulesObserver
- Inherits:
-
Cloudfuji::EventObserver
- Object
- Cloudfuji::EventObserver
- FatFreeCRM::Cloudfuji::EventObservers::EventRulesObserver
- Includes:
- Base
- Defined in:
- lib/fat_free_crm/cloudfuji/event_observers/event_rules_observer.rb
Instance Method Summary collapse
-
#catch_all ⇒ Object
Fire for all events.
Methods included from Base
#find_lead_by_data, #find_or_create_activity_subject!
Instance Method Details
#catch_all ⇒ Object
Fire for all events
8 9 10 11 12 13 14 15 |
# File 'lib/fat_free_crm/cloudfuji/event_observers/event_rules_observer.rb', line 8 def catch_all if lead = find_lead_by_data event_name = "#{params['category']}_#{params['event']}" EventRule.find(:all, :conditions => ["event_category IN ('cloudfuji_event_received', 'page_loaded') AND cloudfuji_event = ?", event_name]).each do |rule| rule.process(lead, params) end end end |