diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-10 16:58:51 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-10 16:58:51 +0400 |
commit | c5f56ee8a06e305265d78cdb847f3dc87bd7e6f2 (patch) | |
tree | a77a1b3a4e811488f4ad0a5348aac9bdbbc7db40 /app/controllers/admin | |
parent | 251945e2e56b52daaeb9c8f71fcea90ba6ad928b (diff) |
Restyle admin:group:show. Remove .all calls fro users, projects here
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/groups_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index df520bea773..c38461c89db 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -12,8 +12,6 @@ class Admin::GroupsController < Admin::ApplicationController @projects = @projects.not_in_group(@group) if @group.projects.present? @projects = @projects.all @projects.reject!(&:empty_repo?) - - @users = User.active end def new @@ -68,7 +66,8 @@ class Admin::GroupsController < Admin::ApplicationController end def project_teams_update - @group.add_users_to_project_teams(params[:user_ids], params[:project_access]) + @group.add_users_to_project_teams(params[:user_ids].split(','), params[:project_access]) + redirect_to [:admin, @group], notice: 'Users were successfully added.' end diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index bbb80cbb839..fa7d730663a 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -14,9 +14,6 @@ class Admin::ProjectsController < Admin::ApplicationController def show @repository = @project.repository - @users = User.active - @users = @users.not_in_project(@project) if @project.users.present? - @users = @users.all end protected |