Use the same sorting everywhere
This commit is contained in:
@ -9,7 +9,7 @@ class ErrorTemplateAttributesController < ApplicationController
|
|||||||
# GET /error_template_attributes
|
# GET /error_template_attributes
|
||||||
# GET /error_template_attributes.json
|
# GET /error_template_attributes.json
|
||||||
def index
|
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!
|
authorize!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ h3
|
|||||||
th = t('activerecord.attributes.error_template_attribute.regex')
|
th = t('activerecord.attributes.error_template_attribute.regex')
|
||||||
th colspan=3 = t('shared.actions')
|
th colspan=3 = t('shared.actions')
|
||||||
tbody
|
tbody
|
||||||
- @error_template.error_template_attributes.order(:important).each do |attribute|
|
- @error_template.error_template_attributes.order('important DESC', :key).each do |attribute|
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
- if attribute.important
|
- if attribute.important
|
||||||
|
Reference in New Issue
Block a user