Created
February 27, 2011 22:17
-
-
Save javierv/846609 to your computer and use it in GitHub Desktop.
Kaminari first page link with page param
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
diff --git a/lib/kaminari/helpers/tags.rb b/lib/kaminari/helpers/tags.rb | |
index 5d77d63..960b8be 100644 | |
--- a/lib/kaminari/helpers/tags.rb | |
+++ b/lib/kaminari/helpers/tags.rb | |
@@ -48,7 +48,7 @@ module Kaminari | |
end | |
def page_url_for(page) | |
- @template.url_for @template.params.merge(@param_name => (page <= 1 ? nil : page) | |
+ @template.url_for @template.params.merge(@param_name => (page < 1 ? nil : page)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment