diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-25 14:26:34 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-25 14:26:34 +0400 |
commit | 97a92f8ae78a186aa76fcc860b570cf07c90c048 (patch) | |
tree | d7d7ec82bcd4a387fc3f44fec89f699f87401a13 /app/controllers/admin | |
parent | c31d48dd250c56164280343a2cbe6ae14bd72a4a (diff) |
Fixed user.namespace_id exception if namespace is nil
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 27dd50e4d8c..42bd6aebbb0 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -47,9 +47,8 @@ class Admin::ProjectsController < AdminController def project id = params[:project_id] || params[:id] - id = id.split("/") if id.include?("/") - @project ||= Project.find_by_path(id) + @project = Project.find_with_namespace(id) @project || render_404 end end |