From b822d4345b42f10b07925ed8f0159d961812b974 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Thu, 26 Feb 2015 11:17:40 -0800 Subject: [PATCH] ability to view individual event #71:close --- app/activity.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/activity.rb b/app/activity.rb index 84a9e60c..ea943ba3 100644 --- a/app/activity.rb +++ b/app/activity.rb @@ -1,6 +1,14 @@ get '/activity' do #expires 7200, :public, :must_revalidate if self.class.production? # 2 hours params[:activity] = 'global' # FIXME this is a bad hack - @events = Event.global_dataset.all + + global_dataset = Event.global_dataset + + if params[:event_id] + global_dataset.where! Sequel.qualify(:events, :id) => params[:event_id] + end + + @events = global_dataset.all + erb :'activity' end