summaryrefslogtreecommitdiff
path: root/app/controllers/projects
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-16 19:03:42 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-16 19:03:42 +0200
commit1d2bdb4d5880bb1ad39b62c81ff2971aa0cb3798 (patch)
tree8ac3215b2c25cb57b5f2198fd4d85c7bad968c2b /app/controllers/projects
parentdba982403b7b894d2096ea61b89a247060eefe57 (diff)
downloadgitlab-ce-1d2bdb4d5880bb1ad39b62c81ff2971aa0cb3798.tar.gz
Move all Context classes into Services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/blob_controller.rb2
-rw-r--r--app/controllers/projects/edit_tree_controller.rb2
-rw-r--r--app/controllers/projects/issues_controller.rb2
-rw-r--r--app/controllers/projects/new_tree_controller.rb2
-rw-r--r--app/controllers/projects/notes_controller.rb4
5 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index fc9807e3c47..2aa73471e2b 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -13,7 +13,7 @@ class Projects::BlobController < Projects::ApplicationController
end
def destroy
- result = Files::DeleteContext.new(@project, current_user, params, @ref, @path).execute
+ result = Files::DeleteService.new(@project, current_user, params, @ref, @path).execute
if result[:status] == :success
flash[:notice] = "Your changes have been successfully committed"
diff --git a/app/controllers/projects/edit_tree_controller.rb b/app/controllers/projects/edit_tree_controller.rb
index 3921273620c..aa4631300e0 100644
--- a/app/controllers/projects/edit_tree_controller.rb
+++ b/app/controllers/projects/edit_tree_controller.rb
@@ -7,7 +7,7 @@ class Projects::EditTreeController < Projects::BaseTreeController
end
def update
- result = Files::UpdateContext.new(@project, current_user, params, @ref, @path).execute
+ result = Files::UpdateService.new(@project, current_user, params, @ref, @path).execute
if result[:status] == :success
flash[:notice] = "Your changes have been successfully committed"
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 83ff968c70f..770fccaa11b 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -89,7 +89,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def bulk_update
- result = Issues::BulkUpdateContext.new(project, current_user, params).execute
+ result = Issues::BulkUpdateService.new(project, current_user, params).execute
redirect_to :back, notice: "#{result[:count]} issues updated"
end
diff --git a/app/controllers/projects/new_tree_controller.rb b/app/controllers/projects/new_tree_controller.rb
index 933a0cb876e..2f3647ab071 100644
--- a/app/controllers/projects/new_tree_controller.rb
+++ b/app/controllers/projects/new_tree_controller.rb
@@ -6,7 +6,7 @@ class Projects::NewTreeController < Projects::BaseTreeController
def update
file_path = File.join(@path, File.basename(params[:file_name]))
- result = Files::CreateContext.new(@project, current_user, params, @ref, file_path).execute
+ result = Files::CreateService.new(@project, current_user, params, @ref, file_path).execute
if result[:status] == :success
flash[:notice] = "Your changes have been successfully committed"
diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb
index 261841f1ea2..9c9c2decc78 100644
--- a/app/controllers/projects/notes_controller.rb
+++ b/app/controllers/projects/notes_controller.rb
@@ -5,7 +5,7 @@ class Projects::NotesController < Projects::ApplicationController
before_filter :authorize_admin_note!, only: [:update, :destroy]
def index
- @notes = Notes::LoadContext.new(project, current_user, params).execute
+ @notes = Notes::LoadService.new(project, current_user, params).execute
notes_json = { notes: [] }
@@ -20,7 +20,7 @@ class Projects::NotesController < Projects::ApplicationController
end
def create
- @note = Notes::CreateContext.new(project, current_user, params).execute
+ @note = Notes::CreateService.new(project, current_user, params).execute
respond_to do |format|
format.json { render_note_json(@note) }