collate 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/collate/active_record_extension.rb +1 -1
- data/lib/collate/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: 8e5d5cff5ee29bc03dba8b9a2c7f8fbbed06ace8
|
4
|
+
data.tar.gz: b5a3ef80d188981dc34eae5ed0db8eedd472ebd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f0ab4fcd4fad5de4e4771654569f7bd3249cf696cc1b6d9cf3778e8623434389af7106df37aeeb04e5d070d4e491acfcf727ba642855704fba36e5d8a007195
|
7
|
+
data.tar.gz: af36de3d2f5f4158da8bc4a26564e9923b19ffaad004f3ffd70b3f793e6138dc10cc2ef9b5ae94c95f8ed881a101b77ee1265989a5c8c13a9de887e0ee43ce2a
|
@@ -51,7 +51,7 @@ module Collate
|
|
51
51
|
default_sort = self.collate_sorters.select { |s| s.default }.first
|
52
52
|
if default_sort.present?
|
53
53
|
ar_rel = apply_sorter ar_rel, default_sort, "#{default_sort.field} #{default_sort.default.upcase}", 'order'
|
54
|
-
params[:order]
|
54
|
+
params[:order] ||= "#{default_sort.field} #{default_sort.default.upcase}"
|
55
55
|
end
|
56
56
|
|
57
57
|
ar_rel
|
data/lib/collate/version.rb
CHANGED