Skip to content

Commit

Permalink
Fix dropdown in tagging
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ZitaNemeckova committed Jan 9, 2018
1 parent 629f2d6 commit 72fa1f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller/tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 72fa1f2

Please sign in to comment.