pg_rails 7.1.3 → 7.1.4

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: 3a62b699dfe2595c04b2c1dbde1379411b3ddaa4c49ad54b0a9f66e421b62796
4
- data.tar.gz: 992584663e2439031e7760c9d97971478a8f9a41d4d9d52b01316d81789b3549
3
+ metadata.gz: 97005ad0cfff2f7088c2dbfe667e1fc8339b8873c3935580d374069fdda0c463
4
+ data.tar.gz: 938afdb82665e744d1c352e5879523329064bb5cadc7c9becdd88bb6aa85505e
5
5
  SHA512:
6
- metadata.gz: cd3261127d268f14b9af5c991f66e959ccd3d5a700d500b109003c8a40fdf376ca8a85a9ff18b053fe657bcf4cdabc12d43ee95804f056fc1091d02c80fa7369
7
- data.tar.gz: 5dfc48133fc688bd971d83586b845c78b8222740c598f7919dfc5ad8619aa3d140698c1fae4d869c4df38574fea07256b5921f03d715c196c0223dc9236bc876
6
+ metadata.gz: ce4389f063db55a1761fa50c4335a5b7c98825222b7c541accd5f3e8b4e65c13f9a7ebe3a65787b7c90219f90f11370136faf1efb98f2b2996d9047fc8707e86
7
+ data.tar.gz: 6a510173f026e874693cc471f9eb251b733164f3cfc1fd72f105b9b556e7cf918962340584e1479d47d130ba723d0c5642a97f3b8097f417c84d7bf495a53c97
@@ -318,7 +318,8 @@ module PgEngine
318
318
  scope = if scope.model.respond_to? "order_by_#{field}"
319
319
  scope.send "order_by_#{field}", direction
320
320
  else
321
- scope.order("#{field} #{direction} nulls last")
321
+ sql = scope.model.arel_table[field.to_sym].send(direction).to_sql + ' nulls last'
322
+ scope.order(sql)
322
323
  end
323
324
  instance_variable_set(:@field, field)
324
325
  instance_variable_set(:@direction, direction)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.1.3'
4
+ VERSION = '7.1.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.3
4
+ version: 7.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso