Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

linting

ulfertsff8361e82ad3
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb
index 8a5bc7dfafc..03537fc030a 100644
--- a/app/helpers/sort_helper.rb
+++ b/app/helpers/sort_helper.rb
@@ -157,9 +157,7 @@ module SortHelper
@criteria.first && @criteria.first.last
end
- def empty?
- @criteria.empty?
- end
+ delegate :empty?, to: :@criteria
private
@@ -167,7 +165,7 @@ module SortHelper
@criteria ||= []
@criteria = @criteria.map do |s|
s = s.to_a
- [s.first, !(s.last == false || s.last == "desc")]
+ [s.first, [false, "desc"].exclude?(s.last)]
end
if @available_criteria