diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-07 10:57:28 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-07 10:57:28 +0300 |
commit | 4cce10583d55360430e0f660ddf3c527f6a42026 (patch) | |
tree | 3146cb0c5e4e622338d6069d934608e85a69df48 /app | |
parent | 89f8020fe12e16faf125a193b25a0eeaea3b49c0 (diff) |
Fix tests for semaphore
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/sortable.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/concerns/sortable.rb b/app/models/concerns/sortable.rb index cca1ee08fe8..0ad2654867d 100644 --- a/app/models/concerns/sortable.rb +++ b/app/models/concerns/sortable.rb @@ -14,11 +14,8 @@ module Sortable scope :order_created_asc, -> { reorder(created_at: :asc, id: :asc) } scope :order_updated_desc, -> { reorder(updated_at: :desc, id: :desc) } 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_desc, -> { reorder(name: :desc) } - end + scope :order_name_asc, -> { reorder(name: :asc) } + scope :order_name_desc, -> { reorder(name: :desc) } end module ClassMethods |