lato_spaces 3.1.3 → 3.1.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe232e4b134fb01afbad6d9220fb77dce9141717b95cad6b9fb22699f5022f91
|
|
4
|
+
data.tar.gz: 3c8878cca97ac1bfe8ab2b122a899b03d163b308ccb1e3f45f4ac3fce6d11c44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db3a73c4672d9bb625a1c38596645c73d9d7683d906b0a58c397df04caa734fcb1cb1cac6dd30236ecee0635c09d06089a620eeccc350b5f3c1e273d2ed6973f
|
|
7
|
+
data.tar.gz: 8e65409a32a0cade03aefa2e2eebec8957f65f59dab8f508778a3de061f6e7192f4c7d7c4721a6a2f5a52f24d76735a1ccb804699ff7346cf16951c7c68d3f1b
|
|
@@ -21,10 +21,7 @@ module LatoSpaces::AssociableRequired
|
|
|
21
21
|
|
|
22
22
|
# listen LatoSpaces::Association destroy event to destroy item
|
|
23
23
|
LatoSpaces::Association.after_destroy do |association|
|
|
24
|
-
|
|
25
|
-
self.destroy!
|
|
26
|
-
end
|
|
24
|
+
association.item&.destroy!
|
|
27
25
|
end
|
|
28
26
|
end
|
|
29
27
|
end
|
|
30
|
-
|
|
@@ -7,7 +7,7 @@ module LatoSpaces::AssociableUnique
|
|
|
7
7
|
|
|
8
8
|
# listen LatoSpaces::Association create event to avoid duplicate associations
|
|
9
9
|
LatoSpaces::Association.before_create do |association|
|
|
10
|
-
if association.
|
|
10
|
+
if association.item&.lato_spaces_associations&.length&.positive?
|
|
11
11
|
throw(:abort)
|
|
12
12
|
end
|
|
13
13
|
end
|
data/lib/lato_spaces/version.rb
CHANGED