diff options
author | Sebastian Klier <sebastian@sebastianklier.com> | 2016-02-28 10:26:52 +0300 |
---|---|---|
committer | Sebastian Klier <sebastian@sebastianklier.com> | 2016-04-20 03:25:40 +0300 |
commit | 54661d3d44a7d98ed52680b074b2caed7aa33676 (patch) | |
tree | b55ca87853bebdd44e8039b04f959a6d07f5213d /app/controllers/projects/wikis_controller.rb | |
parent | 9617c274ab301e4d2401b2d9a179f40649259d3c (diff) |
add slack notifications for wiki pages
update changelog
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r-- | app/controllers/projects/wikis_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb index 9f3a4a69721..6ffcba8d906 100644 --- a/app/controllers/projects/wikis_controller.rb +++ b/app/controllers/projects/wikis_controller.rb @@ -44,7 +44,7 @@ class Projects::WikisController < Projects::ApplicationController return render('empty') unless can?(current_user, :create_wiki, @project) - if @page.update(content, format, message) + if @page = WikiPages::UpdateService.new(@project, current_user, wiki_params).execute(@page) redirect_to( namespace_project_wiki_path(@project.namespace, @project, @page), notice: 'Wiki was successfully updated.' @@ -55,9 +55,9 @@ class Projects::WikisController < Projects::ApplicationController end def create - @page = WikiPage.new(@project_wiki) + @page = WikiPages::CreateService.new(@project, current_user, wiki_params).execute - if @page.create(wiki_params) + if @page redirect_to( namespace_project_wiki_path(@project.namespace, @project, @page), notice: 'Wiki was successfully updated.' |