Skip to content
Browse files

Merge pull request #48 from vedanova/feature/default-ar-desc-ordering

default ordering to id DESC as postgres returns unsorted rows by default
  • Loading branch information...
2 parents 8a672c1 + db2cc1c commit dd6eccba50121694b2056c484d339ccdc56aa81c @akshayrawat committed
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 dd6eccb

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