summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-05 16:49:41 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-05 16:49:41 -0800
commite0aa5c371ea1c633a0648f13cd7bea35f3aea75c (patch)
treea21b09e71748e0e55377b550cd61da509d38169d /app/models/concerns
parent62ed1c537e9b8aa85d354b377f18083fb71b8e05 (diff)
downloadgitlab-ce-e0aa5c371ea1c633a0648f13cd7bea35f3aea75c.tar.gz
Fix method overlap for issue sorting
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/internal_id.rb1
-rw-r--r--app/models/concerns/sortable.rb4
2 files changed, 2 insertions, 3 deletions
diff --git a/app/models/concerns/internal_id.rb b/app/models/concerns/internal_id.rb
index e86357e3dee..821ed54fb98 100644
--- a/app/models/concerns/internal_id.rb
+++ b/app/models/concerns/internal_id.rb
@@ -1,6 +1,5 @@
module InternalId
extend ActiveSupport::Concern
- include Sortable
included do
validate :set_iid, on: :create
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