def resource_proxy(with_deleted = false)
      proxy = if parent_instance.present?
        parent_instance.send(resource_plural_name)
      else
        self.class.resource_class
      end

      if with_deleted and proxy.respond_to?(:with_deleted)
        proxy = proxy.with_deleted
      end

      proxy
    end
def resource_proxy(with_deleted = false)
      proxy = if parent_instance.present?
        parent_instance.send(resource_plural_name)
      else
        self.class.resource_class
      end

      if with_deleted and proxy.respond_to?(:with_deleted)
        proxy = proxy.with_deleted
      end

      proxy
    end
determines if we want to use the parent class if available or
 if we just use the resource class