Changed order of admin/job#index

This commit is contained in:
2024-10-02 12:01:51 +02:00
parent 5c7c079c22
commit 8e111dea0d

View File

@@ -4,7 +4,7 @@ class Admin::JobsController < ApplicationController
before_action :authorize!
def index
@q = Job.ransack(params[:q])
@q.sorts = "id asc" if @q.sorts.empty?
@q.sorts = "id desc" if @q.sorts.empty?
# @pagy, @records = pagy(@q.result(distinct: true), limit: 20)
@calendar, @pagy, @records = pagy_calendar(@q.result, year: {}, month: {}, pagy: {}, active: params[:calendar])
end