def save
      if validate_attrs
        Activity.create(activity_attrs).tap do |activity|
          Callbacks.run(activity)
        end
      else
        warning
      end
    end
def save
      if validate_attrs
        Activity.create(activity_attrs).tap do |activity|
          Callbacks.run(activity)
        end
      else
        warning
      end
    end
This class is for internal usage. No need to initialize this manually,
 instead use controller methods provided.

 When being used as automatical way in controller, e.g. as
 after_filter, supply the controller

   ActivityProcessor.new(self)

 If cache options needs to be attached, ensure the second argument

   ActivityProcessor.new(self, nil, foo: 'bar')

 When being used manually, normally the target would be provided

   ActivityProcessor.new(self, @article, foo: 'bar')

 @param controller [Object] The controller object, often self in controller

 @param target [Object] The target instance. If nil, it will be found based on
        controller.

        When supplied manually, target should be free of error, aka,
        after controller actiton(create, update etc) success

 @param reference [Hash] When required, the second arg "target" should be
        there, either object or nil

 @return warning
         If the target object has any error, the fact is it has not
         passed validation yet. Return a warning in logger.

         If there is any other errors say absence of current_user, warning
         will also be returned from create_activity

 @return Valid activity object from create_activity if everything okay

 Return nil at this level, but not at #initialize. The reason is not to
 throw error on `nil.create_activity`, for validation error of
 target is common case. SimpleActivity should let it pass.