From fb980d4a16e2fa99cc08b8ff058dd042d2d96618 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 12 Sep 2022 21:33:04 -0500 Subject: [PATCH] notes: merge versions when note is deleted. Unlike other models, notes had a special rule where if you deleted or undeleted a note, it would always create a new version instead of merging it into the previous version. Remove this rule since it didn't have a purpose and it was inconsistent with other versioned models. --- app/models/note.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/note.rb b/app/models/note.rb index ef4a5e9b7..04dcab700 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -92,7 +92,7 @@ class Note < ApplicationRecord def merge_version?(updater_id) prev = versions.last - prev && prev.updater_id == updater_id && prev.updated_at > 1.hour.ago && !saved_change_to_is_active? + prev && prev.updater_id == updater_id && prev.updated_at > 1.hour.ago end def revert_to(version)