diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index 8a609e0..6fc322d 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -1,5 +1,6 @@ class ActivitiesController < ApplicationController def index + @activities = [] if Team.exists?(session[:team_id]) @team = Team.find session[:team_id] projects = current_user.anticipated_projects_in_team(@team) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 803abf8..3c3cd88 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -1,5 +1,6 @@ -<%= content_tag :section, class: 'section', id: "activities-team_#{@team.id}" do %> - <% if @activities.any? %> +<% if @activities.any? %> + <%= content_tag :section, class: 'section', id: "activities-team_#{@team.id}" do %> + <% @by_day_groups.each do |by_day_group| %>