gauze 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gauze/base.rb +3 -2
- data/lib/gauze/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: af8c11d59b43f484359623e21c50d8655fe6ece0
|
4
|
+
data.tar.gz: f7414a25b1ae25f85036d68a224aceb648b8d29a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 217cee218befb432aacaec2e96bafc5a33c84a0c1945198ea60de6d2660a698c25d239a3b18f15d39df11b5627ff75adef14d26936829648a333dfd0d50b1ad2
|
7
|
+
data.tar.gz: 27a7d38a05679a154346077e0a3247528b5157716afcf8a9fbd777adc734b2fa3665449437179677eb2494e2c21104be1943087569d78a752ad3bff2e66c441a
|
data/lib/gauze/base.rb
CHANGED
@@ -71,9 +71,10 @@ module Gauze
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def build_order_query(query)
|
74
|
-
|
74
|
+
sory_by_key = (@params[get_klass_var(:@sort_param_key)] || @params[:sort])
|
75
|
+
return default_sort(query) unless sory_by_key.present?
|
75
76
|
|
76
|
-
sort_column = get_klass_var(:@sorters).find {|h| h[:param_key].to_s ==
|
77
|
+
sort_column = get_klass_var(:@sorters).find {|h| h[:param_key].to_s == sory_by_key.underscore}
|
77
78
|
|
78
79
|
return default_sort(query) unless sort_column.present?
|
79
80
|
|
data/lib/gauze/version.rb
CHANGED