switchman 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/associations.rb +5 -4
- data/lib/switchman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 786c667d13377d8e04408f506d0bdb01cf64143a89ba029c0fc373d840851c01
|
4
|
+
data.tar.gz: 01a1e23d2622783d9cc93d36cbec0dbbfd1e4e71d264e7a5e92db9f5446475f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 536073d8679b9b4bc5aa1facfea63ac6289caacca60177264321a75bae80c3795bb7941636cb27b1478ac64a6f0f4df9508a5f4ad6f401f200762050ba2e3a9e
|
7
|
+
data.tar.gz: 64a835f1bf27b2a783f9e834004c43d2c8588b3df22468d5c795e9f6b273d70d1ae8b2645ffab7ff2b23cc8567a0af7d60c37b9136463f0e93378ff965ed0139
|
@@ -273,10 +273,11 @@ module Switchman
|
|
273
273
|
end
|
274
274
|
|
275
275
|
module AutosaveAssociation
|
276
|
-
def
|
277
|
-
|
278
|
-
|
279
|
-
|
276
|
+
def association_foreign_key_changed?(reflection, record, key)
|
277
|
+
return false if reflection.through_reflection?
|
278
|
+
|
279
|
+
# have to use send instead of _read_attribute because sharding
|
280
|
+
record.has_attribute?(reflection.foreign_key) && record.send(reflection.foreign_key) != key
|
280
281
|
end
|
281
282
|
|
282
283
|
def save_belongs_to_association(reflection)
|
data/lib/switchman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|