activerecord-uuid-order 0.7.0 → 0.8.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f69f18b76215c37c938b65b524e091072b664f4d4427a2ed6f6e1e4e39635052
|
4
|
+
data.tar.gz: f59b2a982de527bffe8af7bb2e8e13724f54176ed9208b9366d47c239d57bc38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ad9befc2b277cb90108281b69efdac935b96d877ca69371314539494166ca3331d2c1a62d62357f4fbc5fc9645341ded95e623015b0e7ec15aee7dcc37a4fa
|
7
|
+
data.tar.gz: 4039591446814a215f072659dd741a7887eb16a414934a4511e76bbcd491b4e93227630d771834c7c33647ecd60b07a24d60186cfd674c84399885720e668a64
|
@@ -2,7 +2,11 @@ module ActiveRecord
|
|
2
2
|
module FinderMethods
|
3
3
|
def ordered_relation
|
4
4
|
if order_values.empty? && (implicit_order_column || primary_key)
|
5
|
-
|
5
|
+
if implicit_order_column.present? && implicit_order_column != primary_key
|
6
|
+
order(arel_attribute(implicit_order_column).asc, arel_attribute(primary_key).asc)
|
7
|
+
else
|
8
|
+
order(arel_attribute(implicit_order_column || primary_key).asc)
|
9
|
+
end
|
6
10
|
else
|
7
11
|
self
|
8
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-uuid-order
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|