Fix sorting by important attributes

This commit is contained in:
Maximilian Grundke
2017-07-12 21:43:49 +02:00
parent a9068ef1b7
commit 0fabed4c1e

View File

@ -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')