remove unnecessary redefinition of order_by_name scope

pull/8556/head
Markus Kahl 4 years ago
parent cc5bebdc81
commit 5e795a844a
  1. 2
      app/models/version.rb
  2. 3
      modules/backlogs/app/models/sprint.rb

@ -58,7 +58,7 @@ class Version < ApplicationRecord
scope :systemwide, -> { where(sharing: 'system') }
scope :order_by_name, -> { order(Arel.sql("LOWER(#{Version.table_name}.name)")) }
scope :order_by_name, -> { order(Arel.sql("LOWER(#{Version.table_name}.name) ASC")) }
def self.with_status_open
where(status: 'open')

@ -38,9 +38,6 @@ class Sprint < Version
scope :order_by_date, -> {
reorder(Arel.sql("start_date ASC NULLS LAST, effective_date ASC NULLS LAST"))
}
scope :order_by_name, -> {
order Arel.sql("#{Version.table_name}.name ASC")
}
scope :apply_to, lambda { |project|
where("#{Version.table_name}.project_id = #{project.id}" +

Loading…
Cancel
Save