From e0aa5c371ea1c633a0648f13cd7bea35f3aea75c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 5 Feb 2015 16:49:41 -0800 Subject: Fix method overlap for issue sorting --- app/models/concerns/sortable.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/concerns/sortable.rb') diff --git a/app/models/concerns/sortable.rb b/app/models/concerns/sortable.rb index 49001cabc7c..dc46b2e5463 100644 --- a/app/models/concerns/sortable.rb +++ b/app/models/concerns/sortable.rb @@ -17,7 +17,7 @@ module Sortable end module ClassMethods - def sort(method) + def order_by(method) case method.to_s when 'name' then order_name_asc when 'recent' then order_recent @@ -25,7 +25,7 @@ module Sortable when 'recent_updated' then order_recent_updated when 'oldest_updated' then order_oldest_updated else - self + all end end end -- cgit v1.2.1