From f907c4b5a821ded5ae34ce289d8c25a2b61649a9 Mon Sep 17 00:00:00 2001 From: nilsding Date: Tue, 13 Jan 2015 23:21:16 +0100 Subject: [PATCH] returning 404 if group was not found --- app/controllers/group_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/group_controller.rb b/app/controllers/group_controller.rb index c39c69c1..564e4266 100644 --- a/app/controllers/group_controller.rb +++ b/app/controllers/group_controller.rb @@ -1,7 +1,7 @@ class GroupController < ApplicationController - before_filter :index + before_filter :authenticate_user! def index - @timeline = Group.find_by_name(params[:group_name]).timeline.paginate(page: params[:page]) + @timeline = current_user.groups.find_by_name!(params[:group_name]).timeline.paginate(page: params[:page]) end -end \ No newline at end of file +end