summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-22 10:55:08 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:32:22 -0600
commit206953a430e442fbbd06984b1120890dbf8d3f79 (patch)
tree74922128d6a26bc0c9024b8588c9f38a6250cc0d /app/models/label.rb
parentf72a65603db4dfdb41f327ab03892eed5dadb57e (diff)
downloadgitlab-ce-206953a430e442fbbd06984b1120890dbf8d3f79.tar.gz
Prefer leading style for Style/DotPosition
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 27429e60e4a..e97e53301cc 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -34,18 +34,18 @@ class Label < ActiveRecord::Base
scope :with_title, ->(title) { where(title: title) }
def self.prioritized(project)
- joins(:priorities).
- where(label_priorities: { project_id: project }).
- reorder('label_priorities.priority ASC, labels.title ASC')
+ joins(:priorities)
+ .where(label_priorities: { project_id: project })
+ .reorder('label_priorities.priority ASC, labels.title ASC')
end
def self.unprioritized(project)
labels = Label.arel_table
priorities = LabelPriority.arel_table
- label_priorities = labels.join(priorities, Arel::Nodes::OuterJoin).
- on(labels[:id].eq(priorities[:label_id]).and(priorities[:project_id].eq(project.id))).
- join_sources
+ label_priorities = labels.join(priorities, Arel::Nodes::OuterJoin)
+ .on(labels[:id].eq(priorities[:label_id]).and(priorities[:project_id].eq(project.id)))
+ .join_sources
joins(label_priorities).where(priorities[:priority].eq(nil))
end
@@ -54,9 +54,9 @@ class Label < ActiveRecord::Base
labels = Label.arel_table
priorities = LabelPriority.arel_table
- label_priorities = labels.join(priorities, Arel::Nodes::OuterJoin).
- on(labels[:id].eq(priorities[:label_id])).
- join_sources
+ label_priorities = labels.join(priorities, Arel::Nodes::OuterJoin)
+ .on(labels[:id].eq(priorities[:label_id]))
+ .join_sources
joins(label_priorities)
end