diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-26 13:54:49 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-04-29 16:50:18 +0300 |
commit | 3811eb0ba1e8c0f318060696853b1cab7f99dfa3 (patch) | |
tree | b24961856597d9d4c14450d32e8aa640874872b8 /app/controllers/projects/wikis_controller.rb | |
parent | bfc6a0e3718c1b4d5e3d2adcc1ef16cf5274df5c (diff) |
Fix error when trying to create a wiki page
Closes #15527.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r-- | app/controllers/projects/wikis_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb index c02bc28acef..0d6c32fabd2 100644 --- a/app/controllers/projects/wikis_controller.rb +++ b/app/controllers/projects/wikis_controller.rb @@ -40,10 +40,10 @@ class Projects::WikisController < Projects::ApplicationController end def update - @page = @project_wiki.find_page(params[:id]) - return render('empty') unless can?(current_user, :create_wiki, @project) + @page = @project_wiki.find_page(params[:id]) + if @page = WikiPages::UpdateService.new(@project, current_user, wiki_params).execute(@page) redirect_to( namespace_project_wiki_path(@project.namespace, @project, @page), |