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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45140e48cac5f454da687a338d699e5591818655
4
- data.tar.gz: b36bccfa143950a2334a9e32f8a897d35932ad99
3
+ metadata.gz: af8c11d59b43f484359623e21c50d8655fe6ece0
4
+ data.tar.gz: f7414a25b1ae25f85036d68a224aceb648b8d29a
5
5
  SHA512:
6
- metadata.gz: 0477f1b036d32cb0d9835f1022ba09c25e250326c86a082858696e623b601f2cf3ae83ebb0d68dee76472b6bfe0638fce7d2164ee86722a8f7abf242ec306f11
7
- data.tar.gz: b647e5dfc6d1a0d2a7e90fdfcbe12f8db78023534e887ce364a3d1107a6f18eeeef72b473dcd57fc7b6fb80168e7dd2025f99e3a22aa7be120b8e6ef5c332fef
6
+ metadata.gz: 217cee218befb432aacaec2e96bafc5a33c84a0c1945198ea60de6d2660a698c25d239a3b18f15d39df11b5627ff75adef14d26936829648a333dfd0d50b1ad2
7
+ data.tar.gz: 27a7d38a05679a154346077e0a3247528b5157716afcf8a9fbd777adc734b2fa3665449437179677eb2494e2c21104be1943087569d78a752ad3bff2e66c441a
@@ -71,9 +71,10 @@ module Gauze
71
71
  end
72
72
 
73
73
  def build_order_query(query)
74
- return default_sort(query) unless @params[:sort].present?
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 == (@params[get_klass_var(:@sort_param_key)] || @params[:sort]).underscore}
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
 
@@ -1,3 +1,3 @@
1
1
  module Gauze
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gauze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Ostrowski