Commit 90af7f057b67a06deef7a2efc1d5f99f8590b6ba
1 parent
6a24a483
Exists in
master
and in
28 other branches
ActionItem19: fixing page parameter
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@834 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/design_blocks/favorite_links/controllers/favorite_links_controller.rb
... | ... | @@ -62,7 +62,7 @@ class FavoriteLinksController < ApplicationController |
62 | 62 | end |
63 | 63 | |
64 | 64 | def paginate_by_collection(collection, options = {}) |
65 | - page = ( params[:page] || 1).to_i | |
65 | + page = params[:page].blank? ? 1 : params[:page].to_i | |
66 | 66 | items_per_page = @design_block.limit_number |
67 | 67 | offset = (page - 1) * items_per_page |
68 | 68 | link_pages = Paginator.new(self, collection.size, items_per_page, page) | ... | ... |