From 1c26af4c8caf98871728925f43227609a4bd9439 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sat, 17 Jan 2015 19:07:31 +0100 Subject: [PATCH] @group now holds the current group --- app/controllers/group_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/group_controller.rb b/app/controllers/group_controller.rb index 564e4266..cd774b4e 100644 --- a/app/controllers/group_controller.rb +++ b/app/controllers/group_controller.rb @@ -2,6 +2,7 @@ class GroupController < ApplicationController before_filter :authenticate_user! def index - @timeline = current_user.groups.find_by_name!(params[:group_name]).timeline.paginate(page: params[:page]) + @group = current_user.groups.find_by_name!(params[:group_name]) + @timeline = group.timeline.paginate(page: params[:page]) end end