You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: view_helpers.rb
    path of file: ./repos/public_activity/lib/public_activity/utility
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Provides a shortcut from views to the rendering method.
module PublicActivity
  # Module extending ActionVi
    
    def render_activity activities, options = {}
      if activities.is_a? PublicActivity::Activity
        activities.render self, options
      elsif activities.respond_to?(:map)
        # depend on ORMs to fetch as needed
        # maybe we can support Postgres streaming with this?
        activities.map {|activity| activity.render self, options.dup }.join.html_safe
      end