Class: Kaminari::Helpers::Tag

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#page_url_for(page) ⇒ Object

:nodoc:


6
7
8
9
10
# File 'lib/mighty_grid/kaminari_monkey_patching.rb', line 6

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