Browse Source

Optimisations

remotes/origin/master
echarp 2 years ago
parent
commit
758cb7cb79
  1. 2
      app/models/event.rb

2
app/models/event.rb

@ -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 }

Loading…
Cancel
Save