lato_spaces 3.1.3 → 3.1.5

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: 83d1d5a40a62a72578b2dae9e6c0147c0c85a1b937c187ab38cdbfbac706a6bd
4
- data.tar.gz: 61c10fa403fdeec163fdb834a877724a7ad0e8f3f0a62099a68e9c2d8338a8e9
3
+ metadata.gz: 70979ee95e6c750d066798c627ea760e6eb635275e30e057613bc40c3c4e8a81
4
+ data.tar.gz: f40be9e0eb4c5fe06ef83727e32c4e9403aaef930c16f1a1dee27cc25928935a
5
5
  SHA512:
6
- metadata.gz: 3310aa62fbb20968b3b0506d9637c226765ddb188c1bcd441010ad4cd0eac2b4dfd3c5eeb5f97d9583c224b723f59dea423f69784d8337e5f5f7f79a3239e468
7
- data.tar.gz: 1865a648a751ed6dce943f63716326552d4c86c4b7a5836c18bc9878978f82ef2ce1ec49b58a515bae3e4e88fe300afaf18f42bd0c9dc9e955d9f9f30efa313b
6
+ metadata.gz: 65cf6dade6c4a207e68c71f5e0ac9bd4af8688f104950682bde704c1de4e22bf66fca82309e77287016d6aba2ddd1ad3016b6ef04714ff957c2ec3a3506b0845
7
+ data.tar.gz: 013c60b9478d2167faa616fa9730ea2f97a55354d2dc25aacc2ae201c881d83062f8361d7b4a6290c48469d6fcc9642f5dfe9f35e5caaef1a4755e1a517be2bd
@@ -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
- if lato_spaces_associations.find_by_id association.id
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.item_type == self.class.name && association.item_id == id && lato_spaces_associations.count.positive?
10
+ if association.item&.lato_spaces_associations&.length&.positive?
11
11
  throw(:abort)
12
12
  end
13
13
  end
@@ -15,11 +15,11 @@
15
15
  <span class="fw-bold"><%= group.name %></span>
16
16
  <div class="d-flex justify-content-center align-items-center mt-2">
17
17
  <% if @session.user.lato_spaces_admin || LatoSpaces.config.permit_group_management %>
18
- <%= link_to lato_spaces.groups_show_path(group), class: "btn btn-light btn-sm me-1", data: { turbo_frame: '_top' } do %>
18
+ <%= link_to lato_spaces.groups_show_path(group), class: "btn btn-light me-1", data: { turbo_frame: '_top' } do %>
19
19
  <i class="bi bi-gear"></i>
20
20
  <% end %>
21
21
  <% end %>
22
- <%= link_to lato_spaces.setgroup_path(group), class: "btn btn-#{is_selected ? 'success' : 'primary'} btn-sm ms-1", data: { turbo_method: :post } do %>
22
+ <%= link_to lato_spaces.setgroup_path(group), class: "btn btn-#{is_selected ? 'success' : 'primary'} ms-1", data: { turbo_method: :post } do %>
23
23
  <i class="bi bi-check-circle<%= is_selected ? '-fill' : '' %>"></i>
24
24
  <% end %>
25
25
  </div>
@@ -1,6 +1,6 @@
1
- <%= lato_page_head 'New group', [
1
+ <%= lato_page_head I18n.t('lato_spaces.new_group'), [
2
2
  { label: I18n.t('lato_spaces.spaces'), path: lato_spaces.root_path },
3
- { label: 'Groups', path: lato_spaces.groups_path }
3
+ { label: I18n.t('lato_spaces.groups'), path: lato_spaces.groups_path }
4
4
  ] %>
5
5
 
6
6
  <div class="card">
@@ -1,3 +1,3 @@
1
1
  module LatoSpaces
2
- VERSION = "3.1.3"
2
+ VERSION = "3.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato_spaces
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante