kasket 4.10.2.1 → 4.10.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: 39357427624d53e3972b2ab60f4dfda45f419a882453c10d2546817d4f5a374f
4
- data.tar.gz: cd5deb43db9eeb51c5be9123eb6700d4d9017b16618f4159852b87be07edbe79
3
+ metadata.gz: a786cf4a5580eadc1ad695d662795a160dde563176371c9c0176542eadc1da6c
4
+ data.tar.gz: b9261e224b6aaec4327931a5d723b3fb872cca314a6a5b68681c61b357945fdc
5
5
  SHA512:
6
- metadata.gz: a6770fe5254dda71afa96fcb68205ddfae271418d63212405cf1cf8dfb8585871b417a7709908bc4603b48875d24eb9de6c5acaa414e914fd01ee23fabc1f099
7
- data.tar.gz: 5d41b9265957ea8c68441381c14db2046a85bd61c55a8203dc694483be8b3fc504e8ff0e000c23e7eea53915f1d05da62f0a983d4ae7707d82ba7776ebc9614a
6
+ metadata.gz: daea000b865281f12ae6fd70752f4d1418dadb00a3747452f7db9aa52230c071b8d87b23a37cd0b43a0d3a6db292c418293d25d3b97872f7a597b49b5bb81e5a
7
+ data.tar.gz: f3625ddb2690f619d1f93aa2bcfdff5c72dd3b0f6debe2f19646ef6fba030d206ccab0e920fed37d0869eb8532cb1cc44adbc0d7955cfe215e938327465817ea
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Kasket
3
- VERSION = '4.10.2.1'
3
+ VERSION = '4.10.4'
4
4
  class Version
5
5
  MAJOR = Kasket::VERSION.split('.')[0]
6
6
  MINOR = Kasket::VERSION.split('.')[1]
@@ -40,7 +40,12 @@ module Kasket
40
40
  def kasket_keys(options = {})
41
41
  attribute_sets = [attributes]
42
42
 
43
- previous_changes = options[:previous_changes] || previous_changes()
43
+ previous_changes = options[:previous_changes]
44
+ previous_changes ||= if respond_to?(:saved_changes)
45
+ saved_changes.transform_values(&:first)
46
+ else
47
+ previous_changes() # keep parens or rename the local var
48
+ end
44
49
  if previous_changes.present?
45
50
  old_attributes = previous_changes.each_with_object({}) do |(attribute, (old, _)), all|
46
51
  all[attribute.to_s] = old
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kasket
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.2.1
4
+ version: 4.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-06-22 00:00:00.000000000 Z
12
+ date: 2022-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord