returning 404 if group was not found

This commit is contained in:
nilsding 2015-01-13 23:21:16 +01:00
parent d7350838ba
commit f907c4b5a8
1 changed files with 3 additions and 3 deletions

View File

@ -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
end