Skip to content

Commit

Permalink
User requests: order by newest first
Browse files Browse the repository at this point in the history
  • Loading branch information
aither64 committed Jul 3, 2018
1 parent 035996f commit 6cdfd75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/requests/api/resources/base.rb
Expand Up @@ -54,7 +54,10 @@ def count
end

def exec
with_includes(query).limit(input[:limit]).offset(input[:offset])
with_includes(query)
.limit(input[:limit])
.offset(input[:offset])
.order("#{::UserRequest.table_name}.id DESC")
end
end

Expand Down

0 comments on commit 6cdfd75

Please sign in to comment.