From d71dbb17c5552a14d686c872d9f6ea4ca1925d97 Mon Sep 17 00:00:00 2001 From: Jared Pace Date: Thu, 19 Aug 2010 00:20:38 -0400 Subject: [PATCH] Make sure we're dealing with an int when calling #zero? --- app/controllers/errs_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/errs_controller.rb b/app/controllers/errs_controller.rb index 58d8cf8..12856ac 100644 --- a/app/controllers/errs_controller.rb +++ b/app/controllers/errs_controller.rb @@ -15,7 +15,7 @@ class ErrsController < ApplicationController def show @err = @app.errs.find(params[:id]) page = (params[:notice] || @err.notices.count) - page = 1 if page.zero? + page = 1 if page.to_i.zero? @notices = @err.notices.ordered.paginate(:page => page, :per_page => 1) @notice = @notices.first end -- libgit2 0.21.2