def handle_activity(activity, route)
      # create timeline entry
      klass = Activr.registry.class_for_timeline_entry(self.kind, route.kind)
      timeline_entry = klass.new(self, route.routing_kind, activity)

      # store with callbacks
      if self.should_store_timeline_entry?(timeline_entry)
        self.will_store_timeline_entry(timeline_entry)

        # store
        timeline_entry.store!

        self.did_store_timeline_entry(timeline_entry)

        # trim timeline
        self.trim!
      end

      timeline_entry._id.blank? ? nil : timeline_entry
    end
def handle_activity(activity, route)
      # create timeline entry
      klass = Activr.registry.class_for_timeline_entry(self.kind, route.kind)
      timeline_entry = klass.new(self, route.routing_kind, activity)

      # store with callbacks
      if self.should_store_timeline_entry?(timeline_entry)
        self.will_store_timeline_entry(timeline_entry)

        # store
        timeline_entry.store!

        self.did_store_timeline_entry(timeline_entry)

        # trim timeline
        self.trim!
      end

      timeline_entry._id.blank? ? nil : timeline_entry
    end
Handle activity

 @param activity [Activity] Activity to handle
 @param route [Timeline::Route] The route that caused that activity handling
 @return [Timeline::Entry] Created timeline entry