Sha256: f5b2806cbe2a6de110d2b1ab4008a8bf913d3cacd5fc02e3c04288ff32162a11

Contents?: true

Size: 571 Bytes

Versions: 15

Compression:

Stored size: 571 Bytes

Contents

# encoding: UTF-8
# It is here only until this pull request is pulled: 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 MightyGrid::MgHash.rec_merge(@params, current_page_params_as_hash).symbolize_keys
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mighty_grid-0.6.0 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.5.0 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.4.0 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.3.3 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.3.2 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.3.1 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.3.0 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.2.2 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.2.1 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.2.0 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.1.0 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.0.6 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.0.5 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.0.4 lib/mighty_grid/kaminari_monkey_patching.rb
mighty_grid-0.0.3 lib/mighty_grid/kaminari_monkey_patching.rb