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 | 29 | end |
| 30 | 30 | |
| 31 | 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 | 34 | if status |
| 35 | 35 | redirect_to [:admin, @project], notice: 'Project was successfully updated.' | ... | ... |
app/controllers/projects_controller.rb
| ... | ... | @@ -19,7 +19,7 @@ class ProjectsController < ProjectResourceController |
| 19 | 19 | end |
| 20 | 20 | |
| 21 | 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 | 24 | respond_to do |format| |
| 25 | 25 | flash[:notice] = 'Project was successfully created.' if @project.saved? |
| ... | ... | @@ -35,7 +35,7 @@ class ProjectsController < ProjectResourceController |
| 35 | 35 | end |
| 36 | 36 | |
| 37 | 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 | 40 | respond_to do |format| |
| 41 | 41 | if status | ... | ... |