diff options
author | GitLab <gitlab@localhost> | 2013-01-17 19:35:57 +0400 |
---|---|---|
committer | GitLab <gitlab@localhost> | 2013-01-17 19:35:57 +0400 |
commit | 232d61d59808e6f0c731d135d728800c4b13ae27 (patch) | |
tree | 87356bbbd97abd549fcc489fb3bed60dc0438528 /app/controllers | |
parent | c7c1a97c2fecb8931bbe66af6860a072ca97335d (diff) |
Refactor project creation. Added logout link to profile page
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index fc78db9e3a7..fc2793a72e7 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -29,7 +29,7 @@ class Admin::ProjectsController < AdminController end def update - status = ProjectUpdateContext.new(project, current_user, params).execute(:admin) + status = Projects::UpdateContext.new(project, current_user, params).execute(:admin) if status redirect_to [:admin, @project], notice: 'Project was successfully updated.' diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 6f1180eaa6b..46096f280b8 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -19,7 +19,7 @@ class ProjectsController < ProjectResourceController end def create - @project = Project.create_by_user(params[:project], current_user) + @project = Projects::CreateContext.new(nil, current_user, params).execute respond_to do |format| flash[:notice] = 'Project was successfully created.' if @project.saved? @@ -35,7 +35,7 @@ class ProjectsController < ProjectResourceController end def update - status = ProjectUpdateContext.new(project, current_user, params).execute + status = Projects::UpdateContext.new(project, current_user, params).execute respond_to do |format| if status |