Skip to content
Browse files

default ordering to id DESC as postgres returns unsorted rows by default

  • Loading branch information...
1 parent 8a672c1 commit db2cc1c9b4e63abb1963ade041f20e3f4044fdb3 @corck corck committed Aug 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dj_mon/backend/activerecord.rb
View
2 lib/dj_mon/backend/activerecord.rb
@@ -6,7 +6,7 @@ class << self
def method_missing(method, *args, &block)
scope = ::DjMon::Backend::ActiveRecord.send(method, *args, &block)
limit = Rails.configuration.dj_mon.results_limit
- limit.present? ? scope.order('id DESC').limit(limit) : scope
+ limit.present? ? scope.order('id DESC').limit(limit) : scope.order('id DESC')
end
def respond_to?(method)

0 comments on commit db2cc1c

Please sign in to comment.
Something went wrong with that request. Please try again.