lato_spaces 3.1.5 → 3.1.7

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: 70979ee95e6c750d066798c627ea760e6eb635275e30e057613bc40c3c4e8a81
4
- data.tar.gz: f40be9e0eb4c5fe06ef83727e32c4e9403aaef930c16f1a1dee27cc25928935a
3
+ metadata.gz: 687cd734cbf573f74fff9a5e9a34bd17fd5fa9ebe4f6e777d1008e73f75b8bfb
4
+ data.tar.gz: bab0a9df36e03b6607bd9c28925e23b2500dd01533b3ef24b980dcc37ea43ed8
5
5
  SHA512:
6
- metadata.gz: 65cf6dade6c4a207e68c71f5e0ac9bd4af8688f104950682bde704c1de4e22bf66fca82309e77287016d6aba2ddd1ad3016b6ef04714ff957c2ec3a3506b0845
7
- data.tar.gz: 013c60b9478d2167faa616fa9730ea2f97a55354d2dc25aacc2ae201c881d83062f8361d7b4a6290c48469d6fcc9642f5dfe9f35e5caaef1a4755e1a517be2bd
6
+ metadata.gz: ec18c04d2e1459e66d00bcf38f9de9775eae096541a199069891896ec33ed48bf1bb6106fe2d740109e43d1e3a6a8fc50bb995d9f0fb80b25da97931c9ad64ea
7
+ data.tar.gz: 764ccf9ebc8c2ae7c28f44dac1d4f734852cc6f9c5d57fe3ea28612e5b01df8f0daa98bf38ade70c66279c7a8f792ba2ed3cc8f27fb82c9329995fb1e4dc8c3f
@@ -16,6 +16,20 @@ module LatoSpaces::Associable
16
16
  scope :without_lato_spaces_groups, -> { left_outer_joins(:lato_spaces_groups).where(lato_spaces_groups: { id: nil }) }
17
17
  end
18
18
 
19
+ # Helpers
20
+ ##
21
+
22
+ def lato_spaces_group
23
+ @lato_spaces_group ||= lato_spaces_groups.first
24
+ end
25
+
26
+ def lato_spaces_group_id
27
+ @lato_spaces_group_id ||= lato_spaces_group.try(:id)
28
+ end
29
+
30
+ # Operations
31
+ ##
32
+
19
33
  def add_to_lato_spaces_group(group_id)
20
34
  association = lato_spaces_associations.create(lato_spaces_group_id: group_id)
21
35
  unless association.valid?
@@ -49,8 +63,4 @@ module LatoSpaces::Associable
49
63
 
50
64
  true
51
65
  end
52
-
53
- def lato_spaces_group
54
- lato_spaces_groups.first
55
- end
56
66
  end
@@ -21,7 +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
- association.item&.destroy!
24
+ association.item.destroy
25
25
  end
26
26
  end
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module LatoSpaces
2
- VERSION = "3.1.5"
2
+ VERSION = "3.1.7"
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.5
4
+ version: 3.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-30 00:00:00.000000000 Z
11
+ date: 2023-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails