versions: remove 'subsequent' version comparison option.

This option was rarely used and what it actually did was usually
difficult to understand.
This commit is contained in:
evazion
2022-09-18 05:32:02 -05:00
parent 1d2bac7b95
commit 0c919a6bc8
9 changed files with 2 additions and 36 deletions

View File

@@ -19,11 +19,6 @@ class NoteVersion < ApplicationRecord
@previous.first
end
def subsequent
@subsequent ||= NoteVersion.where("note_id = ? and version > ?", note_id, version).order("updated_at asc").limit(1).to_a
@subsequent.first
end
def current
@current ||= NoteVersion.where(note_id: note_id).order("updated_at desc").limit(1).to_a
@current.first