Commit d71dbb17c5552a14d686c872d9f6ea4ca1925d97

Authored by Jared Pace
1 parent 13a85a21
Exists in master and in 1 other branch production

Make sure we're dealing with an int when calling #zero?

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/errs_controller.rb
... ... @@ -15,7 +15,7 @@ class ErrsController < ApplicationController
15 15 def show
16 16 @err = @app.errs.find(params[:id])
17 17 page = (params[:notice] || @err.notices.count)
18   - page = 1 if page.zero?
  18 + page = 1 if page.to_i.zero?
19 19 @notices = @err.notices.ordered.paginate(:page => page, :per_page => 1)
20 20 @notice = @notices.first
21 21 end
... ...