Class: Kaminari::Helpers::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/active_scaffold/extensions/kaminari_first_page_patch.rb

Instance Method Summary collapse

Instance Method Details

#page_url_for(page) ⇒ Object

kaminary sets page 1 to nil.. that conflicts withc activescaffold, cause in case of nil we try to use page stored in session



5
6
7
# File 'lib/active_scaffold/extensions/kaminari_first_page_patch.rb', line 5

def page_url_for(page)
  @template.url_for @params.merge(@param_name => (page <= 1 ? 1 : page), :only_path => true)
end