Skip to content

Instantly share code, notes, and snippets.

@tejo
Created March 27, 2011 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tejo/889160 to your computer and use it in GitHub Desktop.
Save tejo/889160 to your computer and use it in GitHub Desktop.
monkey patch to make :page_param in to the first link in the kaminari cool pagination solution
module Kaminari
module Helpers
class Tag
def page_url_for(page)
@template.url_for @template.params.merge(@param_name => (page < 1 ? nil : page))
end
end
end
end
@ejosafat
Copy link

ejosafat commented Jan 5, 2012

Thanks!! You saved my evening!

@tejo
Copy link
Author

tejo commented Jan 5, 2012

Glad to help =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment