Project -> update repo only on create and destroy. Fixtures Updated with namespaces. Fixed moving repo

This commit is contained in:
Dmitriy Zaporozhets 2012-11-21 08:54:05 +03:00
parent cc52eed981
commit 70bf7f6e19
11 changed files with 45 additions and 31 deletions

View file

@ -36,7 +36,7 @@ class ProjectsController < ProjectResourceController
def update
namespace_id = params[:project].delete(:namespace_id)
if namespace_id
if namespace_id.present? and namespace_id.to_i != project.namespace_id
namespace = Namespace.find(namespace_id)
project.transfer(namespace)
end