list issues in desc order

This commit is contained in:
ricky committed 2022-02-21 19:33:38 -05:00
1 parent 1344526f7f
commit 440c8e4618
3 files changed
+6 -9

No files matched your search

+2
View File
@@ -62,6 +62,8 @@ class VehiclesController < ApplicationController
begin
@vehicle = Vehicle.find_by_id(params[:id])
@vin = @vehicle.vin.scan(/.{1,9}/) if @vehicle.vin
@issues = @vehicle.issues.order(id: :desc)
@closed_issues = (@issues - @issues.open)
rescue ActiveRecord::RecordNotFound
render_404
end