Permalink
Browse files

Job.find(:last) fix for 404 on cold start

  • Loading branch information...
1 parent 3a47389 commit 1f1a14ed3ffb45a8564d68db508f080efc73bb4e Pete Skomoroch committed Jun 18, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/jobs_controller.rb
@@ -6,7 +6,7 @@ class JobsController < ApplicationController
# GET /jobs.xml
def index
@jobs = Job.paginate :page => params[:page], :order => 'created_at DESC', :per_page =>10
- @job = Job.find(Job.maximum('id'))
+ @job = Job.find(:last)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @jobs }

0 comments on commit 1f1a14e

Please sign in to comment.