Commit 1e3d2389 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev

Replace short loop variable from "p" to "project"

parent 2753cea7
......@@ -68,8 +68,8 @@ class Admin::GroupsController < AdminController
end
def project_teams_update
@group.projects.each do |p|
p.add_users_ids_to_team(params[:user_ids], params[:project_access])
@group.projects.each do |project|
project.add_users_ids_to_team(params[:user_ids], params[:project_access])
end
redirect_to [:admin, @group], notice: 'Users was successfully added.'
end
......
......@@ -59,8 +59,8 @@ class GroupsController < ApplicationController
end
def team_members
@group.projects.each do |p|
p.add_users_ids_to_team(params[:user_ids], params[:project_access])
@group.projects.each do |project|
project.add_users_ids_to_team(params[:user_ids], params[:project_access])
end
redirect_to people_group_path(@group), notice: 'Users was successfully added.'
end
......
......@@ -76,9 +76,9 @@
%tr{class: "user_#{u.id}"}
%td.name= link_to u.name, admin_user_path(u)
%td.projects_access
- u.projects.in_group(@group).each do |p|
- u_p = u.users_projects.in_project(p).first
= "#{p.name} (#{link_to u_p.project_access_human, edit_admin_team_member_path(u_p) })".html_safe
- u.projects.in_group(@group).each do |project|
- u_p = u.users_projects.in_project(project).first
= "#{project.name} (#{link_to u_p.project_access_human, edit_admin_team_member_path(u_p) })".html_safe
%tr
%td.input= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
%td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment