Sha256: 92d3307ddd007211c55a65759c51c06c32e3fabb035c766a4657909a93faf56c

Contents?: true

Size: 548 Bytes

Versions: 9

Compression:

Stored size: 548 Bytes

Contents

# encoding: utf-8

# Ugly monkey-patching Kaminari (https://github.com/amatsuda/kaminari/pull/267)
module Kaminari #:nodoc:
  module Helpers #:nodoc:
    class Tag #:nodoc:
      def page_url_for(page) #:nodoc:
        current_page_params_as_query_string = @param_name.to_s + '=' + (page <= 1 ? nil : page).to_s
        current_page_params_as_hash = Rack::Utils.parse_nested_query(current_page_params_as_query_string)
        @template.url_for Wice::WgHash.rec_merge(@params, current_page_params_as_hash).symbolize_keys
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
wice_grid_ms-3.6.2 lib/wice/kaminari_monkey_patching.rb
wice_grid_ms-3.6.1 lib/wice/kaminari_monkey_patching.rb
wice_grid_ms-3.6.0 lib/wice/kaminari_monkey_patching.rb
wice_grid-3.6.0 lib/wice/kaminari_monkey_patching.rb
wice_grid-3.6.0.pre5 lib/wice/kaminari_monkey_patching.rb
wice_grid-3.6.0.pre4 lib/wice/kaminari_monkey_patching.rb
wice_grid-3.6.0.pre3 lib/wice/kaminari_monkey_patching.rb
wice_grid-3.6.0.pre2 lib/wice/kaminari_monkey_patching.rb
wice_grid-3.6.0.pre1 lib/wice/kaminari_monkey_patching.rb