def filter_callbacks(kind, action_name)
      self.class.send("#{kind}_callbacks").select do |callback|
        callback[:only].nil? || callback[:only].include?(action_name)
      end
    end
def filter_callbacks(kind, action_name)
      self.class.send("#{kind}_callbacks").select do |callback|
        callback[:only].nil? || callback[:only].include?(action_name)
      end
    end
Filter callbacks based on kind

 @param [Symbol] kind
   one of :before or :after

 @return [Array[Hash]]

 @api private