diff options
Diffstat (limited to 'app/controllers/tree_controller.rb')
-rw-r--r-- | app/controllers/tree_controller.rb | 6 |
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" |