Skip to content

Commit 35571be

Browse files
salzigJoschkaSchulz
authored andcommitted
feat: limit locations to since beginning of two years ago
1 parent d4ed74e commit 35571be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/home_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class HomeController < ApplicationController
88
expose(:upcoming_topics) { Topic.ordered.upcoming }
99
expose(:done_topics) { Topic.ordered.done.limit(10) }
1010
expose(:organizers) { User.organizers }
11-
expose(:locations) { Location.all }
11+
expose(:locations) { Location.joins(:events).merge(Event.where(date: (2.years.ago.beginning_of_year)..)).distinct }
1212
expose(:zoom) { Whitelabel[:location][:zoom] }
1313

1414
def index; end

0 commit comments

Comments
 (0)