Commit 9a4b2818 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

order jobs by id in the job list

(should be less confusing)
parent 7d5df09e
......@@ -102,12 +102,12 @@ class JobsController < ApplicationController
# GET /jobs.json
def index
if current_user.admin?
@jobs = Job.not_archived.order("updated_at desc").all
@jobs = Job.not_archived.order("id desc").all
else
if params[:app]
@jobs = Job.not_archived.where(user_id: current_user.id,webapp_id: params[:app] ).order("updated_at desc").all
@jobs = Job.not_archived.where(user_id: current_user.id,webapp_id: params[:app] ).order("id desc").all
else
@jobs = Job.not_archived.where(user_id: current_user.id).order("updated_at desc")
@jobs = Job.not_archived.where(user_id: current_user.id).order("id desc")
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment