Avoid using _id in queries
This makes the queries shorter and easier to read.
This commit is contained in:
parent
124909a64c
commit
f5db9cbb20
8 changed files with 13 additions and 13 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue