Class: Kaminari::Helpers::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/wice/kaminari_monkey_patching.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#page_url_for(page) ⇒ Object

:nodoc:



5
6
7
8
9
# File 'lib/wice/kaminari_monkey_patching.rb', line 5

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