Commit 4ce715a360b089f95bf8e2b37cf87ec237492fcc
Committed by
Dmitriy Zaporozhets
1 parent
1dd0feac
Exists in
master
and in
4 other branches
Fix using context of Projects::UpdateContext (in admin section error, in public …
…section - to next step if moving controlers)
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/admin/projects_controller.rb
@@ -29,7 +29,7 @@ class Admin::ProjectsController < Admin::ApplicationController | @@ -29,7 +29,7 @@ class Admin::ProjectsController < Admin::ApplicationController | ||
29 | end | 29 | end |
30 | 30 | ||
31 | def update | 31 | def update |
32 | - status = Projects::UpdateContext.new(project, current_user, params).execute(:admin) | 32 | + status = ::Projects::UpdateContext.new(project, current_user, params).execute(:admin) |
33 | 33 | ||
34 | if status | 34 | if status |
35 | redirect_to [:admin, @project], notice: 'Project was successfully updated.' | 35 | redirect_to [:admin, @project], notice: 'Project was successfully updated.' |
app/controllers/projects_controller.rb
@@ -19,7 +19,7 @@ class ProjectsController < ProjectResourceController | @@ -19,7 +19,7 @@ class ProjectsController < ProjectResourceController | ||
19 | end | 19 | end |
20 | 20 | ||
21 | def create | 21 | def create |
22 | - @project = Projects::CreateContext.new(current_user, params[:project]).execute | 22 | + @project = ::Projects::CreateContext.new(current_user, params[:project]).execute |
23 | 23 | ||
24 | respond_to do |format| | 24 | respond_to do |format| |
25 | flash[:notice] = 'Project was successfully created.' if @project.saved? | 25 | flash[:notice] = 'Project was successfully created.' if @project.saved? |
@@ -35,7 +35,7 @@ class ProjectsController < ProjectResourceController | @@ -35,7 +35,7 @@ class ProjectsController < ProjectResourceController | ||
35 | end | 35 | end |
36 | 36 | ||
37 | def update | 37 | def update |
38 | - status = Projects::UpdateContext.new(project, current_user, params).execute | 38 | + status = ::Projects::UpdateContext.new(project, current_user, params).execute |
39 | 39 | ||
40 | respond_to do |format| | 40 | respond_to do |format| |
41 | if status | 41 | if status |