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