From d7c550b15bcb79e37a3501cd85943ccc20f74a64 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 11 Mar 2015 15:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99projects=E9=A1=B9=E7=9B=AE=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=E6=97=B6=E5=80=99=E6=B7=BB=E5=8A=A0=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 052df384e..61d89a553 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -180,6 +180,7 @@ class ProjectsController < ApplicationController @project = Project.new @project.safe_attributes = params[:project] @project.organization_id = params[:organization_id] + @project.user_id = User.current.id if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin