snail_trail 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 794fb24551639b3a92404d8b39aec5ff2632f740cff1449488ac29423f1a581b
4
- data.tar.gz: c423186f0a787dcea5711e002770930363daf4b8688c7ce97b110913643d2519
3
+ metadata.gz: d318ee9074719077f6979b96a5f7623e39d8fab08a41846f2b261f2327a70c95
4
+ data.tar.gz: abf3db2a5b328f03d1c4996672000644e0ae9a0863540fd18106fc2b9eebfc67
5
5
  SHA512:
6
- metadata.gz: 2a95e62809a51e755cbe6fe855819000bc22c30def0363985fb8986ea74045f8f36b739051174f581f72545e8237198f6ff6be188468b2e08cff5de099047968
7
- data.tar.gz: c68e72359f86881803278587d4c74bdaa706211c6fbbcc1fc4b6cc6795c49364b6d674c5c1e6252e4ad1e44b6b2e7d2b8871c7f7b2bc8fdf5fd72aa54571fef5
6
+ metadata.gz: c3bd824bb2c4cebd7ed1cf80ed13c1843dadab0584da6be004e4d7a1b1951ab21dd6227c57d5459a2b36ed327fe15b2a1ee4320ebfa861789d92ec497cef1c7e
7
+ data.tar.gz: 4c664aa0dc4ad0041deb0c2adb565de8d3c4e644b947d078fe92b8f460228cb01235694a29d72ca668288b0eb2981d6c72e9c8759dcb445000b8d12d30ed78f3
data/CHANGELOG.adoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.2.0
2
+
3
+ * Sort by primary key instead of timestamp
4
+
1
5
  == 1.1.1
2
6
 
3
7
  * ``performance_mode!`` wasn't saving transaction IDs because it triggers once the transaction is closed
@@ -60,9 +60,7 @@ module SnailTrail
60
60
  # Defaults to using the primary key as the secondary sort order if
61
61
  # possible.
62
62
  def timestamp_sort_order(direction = "asc")
63
- [arel_table[:created_at].send(direction.downcase)].tap do |array|
64
- array << arel_table[primary_key].send(direction.downcase) if primary_key_is_int?
65
- end
63
+ [(arel_table[primary_key].send(direction.downcase) if primary_key_is_int?)].compact
66
64
  end
67
65
 
68
66
  # Given an attribute like `"name"`, query the `versions.object_changes`
@@ -8,8 +8,8 @@ module SnailTrail
8
8
  # People are encouraged to use `SnailTrail.gem_version` instead.
9
9
  module VERSION
10
10
  MAJOR = 1
11
- MINOR = 1
12
- TINY = 1
11
+ MINOR = 2
12
+ TINY = 0
13
13
 
14
14
  # Set PRE to nil unless it's a pre-release (beta, rc, etc.)
15
15
  PRE = nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snail_trail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-16 00:00:00.000000000 Z
11
+ date: 2025-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord