Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroyuki Sato <h-sato@ruby-dev.jp>2017-03-04 17:03:14 +0300
committerHiroyuki Sato <sathiroyuki@gmail.com>2017-03-08 12:42:50 +0300
commita5521bad4012a9eea21cb067271c8ec1810c6d8c (patch)
tree3544226812c93e9abfcaceafd939fc4a168ecd61 /app/controllers/projects/wikis_controller.rb
parente78a366925553a1268f8dc6e0d57342053a3240a (diff)
Prevent concurrent editing wiki
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r--app/controllers/projects/wikis_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index 2d8064c9878..d27af79e003 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -56,6 +56,9 @@ class Projects::WikisController < Projects::ApplicationController
else
render 'edit'
end
+ rescue WikiPage::PageChangedError
+ @conflict = true
+ render 'edit'
end
def create
@@ -125,6 +128,6 @@ class Projects::WikisController < Projects::ApplicationController
end
def wiki_params
- params[:wiki].slice(:title, :content, :format, :message)
+ params[:wiki].slice(:title, :content, :format, :message, :last_commit_sha)
end
end