From 3cda2248a2f5214f7c00c16e541127570863da94 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 26 Mar 2014 14:21:54 +0400 Subject: [PATCH] #345: fixed: visibility of projects --- app/controllers/groups/profile_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/groups/profile_controller.rb b/app/controllers/groups/profile_controller.rb index 6b8d76b2c..df81df8fb 100644 --- a/app/controllers/groups/profile_controller.rb +++ b/app/controllers/groups/profile_controller.rb @@ -10,7 +10,7 @@ class Groups::ProfileController < Groups::BaseController def show @path, page = group_path(@group), params[:page].to_i - @projects = @group.own_projects.opened.search(params[:search]).recent + @projects = @group.own_projects.search(params[:search]).recent if request.xhr? if params[:visibility] != 'hidden' @projects = @projects.opened @@ -20,6 +20,7 @@ class Groups::ProfileController < Groups::BaseController end render partial: 'shared/profile_projects', layout: nil, locals: {projects: paginate_projects(page)} else + @projects = @projects.opened @projects = paginate_projects(page) end end