diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-10-27 07:48:26 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-10-28 02:07:11 +0300 |
commit | 0badbef83658ab2c23c7f7ea0aef81284c96c55b (patch) | |
tree | cde3c077bceee3a6d46695b5d229f8203b8662c3 /app/models/event.rb | |
parent | 20a7db4483904c7280093a0309a63dfd1b7ef72e (diff) |
Optimize Event queries by removing default order
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index 3993b35f96d..43e67069b70 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -1,6 +1,6 @@ class Event < ActiveRecord::Base include Sortable - default_scope { where.not(author_id: nil) } + default_scope { reorder(nil).where.not(author_id: nil) } CREATED = 1 UPDATED = 2 |