Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-06 07:29:41 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-06 07:29:41 +0300
commit8952fc015fae476a20051c01cf4217d82d30c83d (patch)
tree07f05c55ff385ce176e148116a04f7abb3a9558a /app/models/label.rb
parentc5be267e40c0ba05c2a7de6a71d154f1b5161160 (diff)
Apply default scope to labels and remove one for notes
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index c8f6a7cd48c..9d7099c5652 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -11,8 +11,6 @@
#
class Label < ActiveRecord::Base
- include Sortable
-
DEFAULT_COLOR = '#428BCA'
belongs_to :project
@@ -30,7 +28,7 @@ class Label < ActiveRecord::Base
format: { with: /\A[^&\?,&]+\z/ },
uniqueness: { scope: :project_id }
- scope :order_by_name, -> { reorder("labels.title ASC") }
+ default_scope { order(title: :asc) }
alias_attribute :name, :title