public function willPaginate(\Rails\ActiveRecord\Collection $collection, array $options = []) { if ($collection->totalPages() <= 1 && !$this->config()->alwaysShow()) { return ''; } $rendererClass = $this->rendererClass($options); $renderer = new $rendererClass($this, $collection, $options); return $renderer->toHtml(); }