OSDN Git Service

Fix project adding to team
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 25 Jan 2013 11:56:04 +0000 (13:56 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 25 Jan 2013 11:56:04 +0000 (13:56 +0200)
app/controllers/teams/projects_controller.rb

index 27dc934..e87889b 100644 (file)
@@ -23,7 +23,7 @@ class Teams::ProjectsController < Teams::ApplicationController
 
     # Reject non-allowed projects
     allowed_project_ids = current_user.owned_projects.map(&:id)
-    project_ids.select! { |id| allowed_project_ids.include?(id) }
+    project_ids.select! { |id| allowed_project_ids.include?(id.to_i) }
 
     # Assign projects to team
     user_team.assign_to_projects(project_ids, access)