Skip to content
Snippets Groups Projects
Commit 4ce715a3 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev Committed by Dmitriy Zaporozhets
Browse files

Fix using context of Projects::UpdateContext (in admin section error, in...

Fix using context of Projects::UpdateContext (in admin section error, in public section - to next step if moving controlers)
parent 1dd0feac
No related branches found
No related tags found
2 merge requests!2940Expanding repos and hooks paths in settings,!2746New feature: Teams
Loading
Loading
@@ -29,7 +29,7 @@ class Admin::ProjectsController < Admin::ApplicationController
end
 
def update
status = Projects::UpdateContext.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.'
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ class ProjectsController < ProjectResourceController
end
 
def create
@project = Projects::CreateContext.new(current_user, params[:project]).execute
@project = ::Projects::CreateContext.new(current_user, params[:project]).execute
 
respond_to do |format|
flash[:notice] = 'Project was successfully created.' if @project.saved?
Loading
Loading
@@ -35,7 +35,7 @@ class ProjectsController < ProjectResourceController
end
 
def update
status = Projects::UpdateContext.new(project, current_user, params).execute
status = ::Projects::UpdateContext.new(project, current_user, params).execute
 
respond_to do |format|
if status
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment