From 72fa1f2daad3c2ee610dc27c9051394145794312 Mon Sep 17 00:00:00 2001 From: Zita Nemeckova Date: Tue, 9 Jan 2018 12:00:21 +0100 Subject: [PATCH] Fix dropdown in tagging Classification.categories.select(&:show).sort_by(&:name)[0] != Classification.categories.select(&:show).sort_by(&:name).min_by[&:description] Replaced description to name to make it equal --- app/controllers/application_controller/tags.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller/tags.rb b/app/controllers/application_controller/tags.rb index 08112e969a0..96edddbb97d 100644 --- a/app/controllers/application_controller/tags.rb +++ b/app/controllers/application_controller/tags.rb @@ -215,7 +215,7 @@ def tag_edit_build_screen end # Set to first category, if not already set - @edit[:cat] ||= cats.min_by(&:description) + @edit[:cat] ||= cats.min_by(&:name) unless @object_ids.blank? @tagitems = @tagging.constantize.where(:id => @object_ids).sort_by { |t| t.name.try(:downcase).to_s }