From 4df78def01fc395f7902deb6f0d11d1d8b8efda7 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Mon, 2 Oct 2023 22:48:24 +0200 Subject: [PATCH] fix: documents sort sql needs Arel.sql --- plugins/documents/app/controllers/documents_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/documents/app/controllers/documents_controller.rb b/plugins/documents/app/controllers/documents_controller.rb index 7290ef3c..8950f347 100644 --- a/plugins/documents/app/controllers/documents_controller.rb +++ b/plugins/documents/app/controllers/documents_controller.rb @@ -14,7 +14,7 @@ class DocumentsController < ApplicationController else 'data IS NULL DESC, name' end - + sort = Arel.sql(sort) # this is okay as we don't use user params directly @documents = Document.where(parent: @document).page(params[:page]).per(@per_page).order(sort) end