diff --git a/app/controllers/error_template_attributes_controller.rb b/app/controllers/error_template_attributes_controller.rb index e5e0d486..05de2772 100644 --- a/app/controllers/error_template_attributes_controller.rb +++ b/app/controllers/error_template_attributes_controller.rb @@ -9,7 +9,7 @@ class ErrorTemplateAttributesController < ApplicationController # GET /error_template_attributes # GET /error_template_attributes.json def index - @error_template_attributes = ErrorTemplateAttribute.all.order(:id).paginate(page: params[:page]) + @error_template_attributes = ErrorTemplateAttribute.all.order('important DESC', :key, :id).paginate(page: params[:page]) authorize! end diff --git a/app/views/error_templates/show.html.slim b/app/views/error_templates/show.html.slim index 574e3d88..9936ef7f 100644 --- a/app/views/error_templates/show.html.slim +++ b/app/views/error_templates/show.html.slim @@ -20,7 +20,7 @@ h3 th = t('activerecord.attributes.error_template_attribute.regex') th colspan=3 = t('shared.actions') tbody - - @error_template.error_template_attributes.order(:important).each do |attribute| + - @error_template.error_template_attributes.order('important DESC', :key).each do |attribute| tr td - if attribute.important