Optimisations

This commit is contained in:
echarp 2020-02-08 15:24:29 +01:00
parent a82c832354
commit 758cb7cb79

View File

@ -44,7 +44,7 @@ class Event < ApplicationRecord
# The 3000 limit is purely arbitrary...
default_scope do
joins(:region).includes(:base_tags).order('events.id desc').limit(3000)
includes(:base_tags).order('events.id desc').limit(3000)
end
scope :moderated, ->(*) { where moderated: true }
scope :unmoderated, ->(*) { where moderated: false }