def side_load(resources, side_loads)
      key = "#{options.name}_id"
      plural_key = "#{Inflection.singular options.name.to_s}_ids"

      resources.each do |resource|
        if resource.key?(plural_key) # Grab associations from child_ids field on resource
          side_load_from_child_ids(resource, side_loads, plural_key)
        elsif resource.key?(key) || options.singular
          side_load_from_child_or_parent_id(resource, side_loads, key)
        else # Grab associations from parent_id field from multiple child resources
          side_load_from_parent_id(resource, side_loads, key)
        end
      end
    end
def side_load(resources, side_loads)
      key = "#{options.name}_id"
      plural_key = "#{Inflection.singular options.name.to_s}_ids"

      resources.each do |resource|
        if resource.key?(plural_key) # Grab associations from child_ids field on resource
          side_load_from_child_ids(resource, side_loads, plural_key)
        elsif resource.key?(key) || options.singular
          side_load_from_child_or_parent_id(resource, side_loads, key)
        else # Grab associations from parent_id field from multiple child resources
          side_load_from_parent_id(resource, side_loads, key)
        end
      end
    end
Tries to place side loads onto given resources.