Removed limit which was interacting to the stats count
This commit is contained in:
parent
81f2e3add7
commit
19826f581a
@ -83,7 +83,8 @@ class EventsController < ApplicationController
|
||||
private
|
||||
|
||||
def set_events
|
||||
@events = apply_scopes Event.moderated
|
||||
# The 3000 limit is purely arbitrary...
|
||||
@events = apply_scopes Event.moderated.limit(3000)
|
||||
@events = @events.limit(20) if params[:format] == 'rss'
|
||||
end
|
||||
|
||||
|
@ -30,7 +30,7 @@ class StatsController < ApplicationController
|
||||
|
||||
def set_events
|
||||
# Remove the ordering which can occur after geocoding
|
||||
@events = apply_scopes(Event.moderated).reorder nil
|
||||
@events = apply_scopes(Event.unscoped.moderated).reorder nil
|
||||
end
|
||||
|
||||
def year_grouping
|
||||
|
@ -42,8 +42,7 @@ class Event < ApplicationRecord
|
||||
|
||||
after_destroy EventCallbacks
|
||||
|
||||
# The 3000 limit is purely arbitrary...
|
||||
default_scope { includes(:base_tags).order('events.id desc').limit(3000) }
|
||||
default_scope { includes(:base_tags).order('events.id desc') }
|
||||
scope :moderated, ->(*) { where moderated: true }
|
||||
scope :unmoderated, ->(*) { where moderated: false }
|
||||
scope :past, -> { where 'start_time <= ?', Time.zone.now }
|
||||
|
Loading…
Reference in New Issue
Block a user