Skip to content

Commit

Permalink
remove Version order_by_name scope
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Oct 21, 2024
1 parent 7c13c2d commit 8514dd7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/queries/versions/orders/name_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.key
private

def order
ordered = Version.order_by_name
ordered = Version.order(:name)

if direction == :desc
ordered = ordered.reverse_order
Expand Down
2 changes: 0 additions & 2 deletions app/models/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ class Version < ApplicationRecord

scope :systemwide, -> { where(sharing: "system") }

scope :order_by_name, -> { order(Arel.sql("LOWER(#{Version.table_name}.name) ASC")) }

def self.with_status_open
where(status: "open")
end
Expand Down

0 comments on commit 8514dd7

Please sign in to comment.