From dcf4b95298d7fd39c36ddf45010c77bf3ad0a8aa Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 26 Jun 2026 19:26:52 +0200 Subject: exports: fix crash on the UOC view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently @results is no longer an ActiveRecord::Relation, but a mere Array which doesn't have the #order method. Let's use Array#sort_by. Signed-off-by: Miquel Sabaté Solà --- app/views/exports/show.uoc.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/exports') diff --git a/app/views/exports/show.uoc.erb b/app/views/exports/show.uoc.erb index b8f73b1..d99d7f9 100644 --- a/app/views/exports/show.uoc.erb +++ b/app/views/exports/show.uoc.erb @@ -2,6 +2,6 @@ {\setlength{\parskip}{-0.3cm} -<%= UocExporter.new(things: @results.order(:authors)).export %> +<%= UocExporter.new(things: @results.sort_by(&:authors)).export %> } -- cgit v1.2.3