summaryrefslogtreecommitdiff
path: root/app/controllers/tree_controller.rb
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-10-26 01:59:50 +0200
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-10-26 01:59:50 +0200
commit700a784bc91c0ee24cbe2f1c36589e40b92ac28d (patch)
tree1f818a905cdabe2b5d24cc147aea1386e0a7248c /app/controllers/tree_controller.rb
parent3080127354a2c92fd3ceecc05fe93e091e3b5eec (diff)
downloadgitlab-ce-700a784bc91c0ee24cbe2f1c36589e40b92ac28d.tar.gz
Refactor EditFileAction#update and rename it to commit!
Diffstat (limited to 'app/controllers/tree_controller.rb')
-rw-r--r--app/controllers/tree_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/tree_controller.rb b/app/controllers/tree_controller.rb
index 7b527041d7e..725f48fa014 100644
--- a/app/controllers/tree_controller.rb
+++ b/app/controllers/tree_controller.rb
@@ -26,14 +26,14 @@ class TreeController < ProjectResourceController
end
def update
- file_editor = Gitlab::Satellite::EditFileAction.new(current_user, @project, @ref, @path)
- update_status = file_editor.update(
+ edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, @project, @ref, @path)
+ updated_successfully = edit_file_action.commit!(
params[:content],
params[:commit_message],
params[:last_commit]
)
- if update_status
+ if updated_successfully
redirect_to project_tree_path(@project, @id), notice: "Your changes have been successfully commited"
else
flash[:notice] = "Your changes could not be commited, because the file has been changed"