lato_spaces 3.1.21 → 3.1.22

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: be2bfe1d12ffd6a6776ed821ba3a87faa2ffa65f54172c6c6bd4c0f4b75369c6
4
- data.tar.gz: 198d5f7525775d514fb1d32ab02d9eb0568d6dc0732bb2a8b96798a4db4aff2a
3
+ metadata.gz: 8be2ba859fb4758a001f626ba2faab4b254dc65fdd39e31110a12f01f33cff80
4
+ data.tar.gz: f45a5f7a94806d23ea6a7557be9f57ee6d0423a3805fb4aa7bd8287c26c07b57
5
5
  SHA512:
6
- metadata.gz: 3980b1cb0f1061b1438c93e3ca4af49bc89da9d6cfb0d925a1bda773276434ede52a77ea16a9c0dc8b5c54893cc4d5824845ef923da7e5da1be791dd8ec118b1
7
- data.tar.gz: 1d12290c939338e0ead2a475991e091166fb005dc6fdf70acce97ccff654de32ce6a4a0476d9fe084189e2bb8865d385a1633094ae3191a55120ba5811e658d3
6
+ metadata.gz: '01259f92ebb9457bdac1ad09df4164d2862f430461e5ec88b6662d18fba8cb9ddb12d9944650f433f44fb008495acce978ecb63392b4ee4881abc4cebca07e39'
7
+ data.tar.gz: 90de698d6fd4af00d2d787f033e26d022d459eaf03eb43ee97fc16cf9563cf77957d0e5495ca64bb0030c8db3951f82bba6740b6d8396b9a50ad2f367923efeb
@@ -12,16 +12,22 @@ module LatoSpaces::AssociableRequired
12
12
  # Hooks
13
13
  ##
14
14
 
15
- after_create do
16
- lato_spaces_associations.create!(lato_spaces_group_id: lato_spaces_group_id)
15
+ after_create_commit do
16
+ unless lato_spaces_associations.create(lato_spaces_group_id: lato_spaces_group_id)
17
+ Rails.logger.error "Failed to create LatoSpaces association for #{self.class.name} with ID #{id} and group ID #{lato_spaces_group_id}"
18
+ end
17
19
  end
18
20
 
19
21
  # External hooks
20
22
  ##
21
23
 
22
24
  # listen LatoSpaces::Association destroy event to destroy item
23
- LatoSpaces::Association.after_destroy do |association|
24
- association.item&.destroy!
25
+ LatoSpaces::Association.after_destroy_commit do |association|
26
+ if association.item
27
+ unless association.item.destroy
28
+ Rails.logger.error "Failed to destroy #{association.item.class.name} with ID #{association.item_id} after LatoSpaces association destruction"
29
+ end
30
+ end
25
31
  end
26
32
  end
27
33
  end
@@ -16,10 +16,10 @@ module LatoSpaces
16
16
  # Params of the membership.
17
17
  attr_accessor :membership_params
18
18
 
19
- # Permit creation of groups for users.
19
+ # Permit creation of groups for users (not admins).
20
20
  attr_accessor :permit_group_creation
21
21
 
22
- # Permit management of groups for users.
22
+ # Permit management of groups for users (not admins).
23
23
  attr_accessor :permit_group_management
24
24
 
25
25
  # Permit users to choose a preferred group.
@@ -1,3 +1,3 @@
1
1
  module LatoSpaces
2
- VERSION = "3.1.21"
2
+ VERSION = "3.1.22"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato_spaces
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.21
4
+ version: 3.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-03 00:00:00.000000000 Z
11
+ date: 2025-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails