From 0fabed4c1eb4490081f4cd66c18177ac570134c5 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Wed, 12 Jul 2017 21:43:49 +0200 Subject: [PATCH] Fix sorting by important attributes --- app/views/error_templates/show.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/error_templates/show.html.slim b/app/views/error_templates/show.html.slim index 5b513e6c..574e3d88 100644 --- a/app/views/error_templates/show.html.slim +++ b/app/views/error_templates/show.html.slim @@ -35,6 +35,6 @@ h3 #add-attribute = collection_select({}, :error_template_attribute_id, - ErrorTemplateAttribute.where.not(id: @error_template.error_template_attributes.select(:id).to_a).order(:important, :key), + ErrorTemplateAttribute.where.not(id: @error_template.error_template_attributes.select(:id).to_a).order('important DESC', :key), :id, :key, {include_blank: false}, class: '') button.btn.btn-default = t('error_templates.add_attribute')