Avoid using _id in queries

This makes the queries shorter and easier to read.
This commit is contained in:
Andy Allan 2023-08-30 16:45:04 +01:00
parent 124909a64c
commit f5db9cbb20
8 changed files with 13 additions and 13 deletions

View file

@ -251,7 +251,7 @@ module Api
end
# Find the comments we want to return
@comments = NoteComment.where(:note_id => notes).order("created_at DESC").limit(result_limit).preload(:note)
@comments = NoteComment.where(:note => notes).order("created_at DESC").limit(result_limit).preload(:note)
# Render the result
respond_to do |format|