Created
March 27, 2011 12:25
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!! You saved my evening!