Optimisations
This commit is contained in:
parent
a82c832354
commit
758cb7cb79
@ -44,7 +44,7 @@ class Event < ApplicationRecord
|
|||||||
|
|
||||||
# The 3000 limit is purely arbitrary...
|
# The 3000 limit is purely arbitrary...
|
||||||
default_scope do
|
default_scope do
|
||||||
joins(:region).includes(:base_tags).order('events.id desc').limit(3000)
|
includes(:base_tags).order('events.id desc').limit(3000)
|
||||||
end
|
end
|
||||||
scope :moderated, ->(*) { where moderated: true }
|
scope :moderated, ->(*) { where moderated: true }
|
||||||
scope :unmoderated, ->(*) { where moderated: false }
|
scope :unmoderated, ->(*) { where moderated: false }
|
||||||
|
Loading…
Reference in New Issue
Block a user