OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/models/queries/principals/orders/name_order.rb

19 lines
282 B

class Queries::Principals::Orders::NameOrder < Queries::BaseOrder
self.model = Principal
def self.key
:name
end
private
def order
ordered = self.model.order_by_name
if direction == :desc
ordered = ordered.reverse_order
end
ordered
end
end