forest_liana 8.2.0 → 8.3.0

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
  SHA256:
3
- metadata.gz: aada07cfc20b60dc59e85b49de4b7d719a2f6d8fddcc7a432b36fbfb754a310e
4
- data.tar.gz: bad11ea920e7c0a191f201ad7ba77cb23b54e5a1861b7e2d2d464d23f7885032
3
+ metadata.gz: 4ea6ac547b42d4f12e817252a87559007df62b18ab679d3ca7c6c3c5a4cd5e00
4
+ data.tar.gz: 061b0e356dc3b0d3d3a83ee2b09760b20f13573b021abf7ed1cd0c9a4e810322
5
5
  SHA512:
6
- metadata.gz: d8a2918ef6b5271a11c26e1fb84f6eec5a202eee345ab34412e8669de17fa75ca0a1edeb150cb259e154ea00ffed7e46e552bab7008b5a3bba9dd90b1358287f
7
- data.tar.gz: 4fc0f3ea03ef0a04d63fa2ce633769b939b67892988becb3884e8109dfbbff0ef8fd6a8ff1dbc185a58d91ab61c85cb30b06cf0e96e18cbfb69131f7da1c0699
6
+ metadata.gz: 67743e9e1cd9d3d1ce893b151b9069c5025d17fcdb763c936e699fd1cdf39b5b30392d0410bc9b77cb9a927bcda8b23755a59bee008928d4e6c73be0a2419710
7
+ data.tar.gz: b74d7d94e51a29636935b751db6963a257f8f27e83e608b4a73b4a0fe6d4a459dbb3b27f602104b9a565da6f9a52f6ee699b278f052588d3f3cac09b3fb5b566
@@ -160,12 +160,9 @@ module ForestLiana
160
160
  end
161
161
 
162
162
  def sort_query
163
- column = nil
164
- order = 'DESC'
165
-
166
163
  if @params[:sort]
167
164
  @params[:sort].split(',').each do |field|
168
- order_detected = detect_sort_order(@params[:sort])
165
+ order_detected = detect_sort_order(field)
169
166
  order = order_detected.upcase
170
167
  field.slice!(0) if order_detected == :desc
171
168
 
@@ -175,14 +172,12 @@ module ForestLiana
175
172
  else
176
173
  column = field
177
174
  end
175
+
176
+ @records = @records.order(Arel.sql("#{column} #{order}"))
178
177
  end
179
178
  end
180
179
 
181
- if column
182
- @records = @records.order(Arel.sql("#{column} #{order}"))
183
- else
184
- @records
185
- end
180
+ @records
186
181
  end
187
182
 
188
183
  def detect_reference(param)
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "8.2.0"
2
+ VERSION = "8.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.0
4
+ version: 8.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-29 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails