Sha256: 83d7d0c6950ad213387208a1107e8a0ba8bc830eeee927b4dcba39be56b6cb82

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

require 'will_paginate'

class Commontator::LinkRenderer < WillPaginate::ActionView::LinkRenderer
  protected

  def url(page)
    @base_url_params ||= begin
      url_params = merge_get_params(default_url_params)
      merge_optional_params(url_params)
    end

    url_params = @base_url_params.dup
    add_current_page_param(url_params, page)

    routes_proxy = @options[:routes_proxy] || @template
    routes_proxy.url_for(url_params)
  end

  private

  def link(text, target, attributes = {})
    attributes = attributes.merge('data-remote' => true) if @options[:remote]
    super
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
commontator-6.0.0.pre.1 app/helpers/commontator/link_renderer.rb