From c7cad11b898cb3215fa03a07309bd5f840f35afd Mon Sep 17 00:00:00 2001 From: Torsten Date: Thu, 5 Jan 2023 17:47:20 +0200 Subject: [PATCH] make changeSets Sets (duh) to avoid repetition --- app/models/merged/change_set.rb | 6 +++--- app/views/merged/changes/index.haml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/merged/change_set.rb b/app/models/merged/change_set.rb index 288bb15..4af86b0 100644 --- a/app/models/merged/change_set.rb +++ b/app/models/merged/change_set.rb @@ -13,9 +13,9 @@ module Merged def zero [Page, Section, Card].each { |m| m.reload(true) } - @adds = [] - @edits = [] - @deletes = [] + @adds = Set.new + @edits = Set.new + @deletes = Set.new end def add( type , text) diff --git a/app/views/merged/changes/index.haml b/app/views/merged/changes/index.haml index 6b237a5..356a4e9 100644 --- a/app/views/merged/changes/index.haml +++ b/app/views/merged/changes/index.haml @@ -27,6 +27,7 @@ %td.px-4.py-2.text-gray-700 - changeset(type , element).each do |name| =name.last + %br .grid.grid-cols-3.bg-white .items-center.justify-center.col-span-2