Commit 4cce1058 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tests for semaphore

parent 89f8020f
...@@ -14,12 +14,9 @@ module Sortable ...@@ -14,12 +14,9 @@ module Sortable
scope :order_created_asc, -> { reorder(created_at: :asc, id: :asc) } scope :order_created_asc, -> { reorder(created_at: :asc, id: :asc) }
scope :order_updated_desc, -> { reorder(updated_at: :desc, id: :desc) } scope :order_updated_desc, -> { reorder(updated_at: :desc, id: :desc) }
scope :order_updated_asc, -> { reorder(updated_at: :asc, id: :asc) } scope :order_updated_asc, -> { reorder(updated_at: :asc, id: :asc) }
if column_names.include?('name')
scope :order_name_asc, -> { reorder(name: :asc) } scope :order_name_asc, -> { reorder(name: :asc) }
scope :order_name_desc, -> { reorder(name: :desc) } scope :order_name_desc, -> { reorder(name: :desc) }
end end
end
module ClassMethods module ClassMethods
def order_by(method) def order_by(method)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment