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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user