switchman 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/query_methods.rb +5 -3
- data/lib/switchman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf642d4e18ec28d2f9b71eb4aa3d4edb8ec8a92
|
4
|
+
data.tar.gz: 64297343a489ffdfc3eb22f851a2c11dc797d211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c185968b0864ed798bda19dedb9268473f672e118ce01636f3d9c0449f902b7c3ae6a2244342530566232e42b38739df47f5af93ed00d3be60eb1c20906c7e
|
7
|
+
data.tar.gz: 3abd5123fa4d0807492131fd0179d17df0784b6c6abbca69fc178db9cd4fb78338037414ee0f3a44294d832933471010524e93c7a580361869eedeba535ff609
|
@@ -98,9 +98,11 @@ module Switchman
|
|
98
98
|
def reverse_order!
|
99
99
|
orders = order_values.uniq
|
100
100
|
orders.reject!(&:blank?)
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
if orders.empty?
|
102
|
+
self.order_values = [arel_table[primary_key].desc]
|
103
|
+
else
|
104
|
+
self.order_values = reverse_sql_order(orders)
|
105
|
+
end
|
104
106
|
self
|
105
107
|
end
|
106
108
|
end
|
data/lib/switchman/version.rb
CHANGED