From 64bb19069dba585c6e4622073e5140f052c2661a Mon Sep 17 00:00:00 2001 From: "Vitaliy @blackst0ne Klachkov" Date: Wed, 11 Oct 2017 20:03:19 +1100 Subject: Add support for markdown preview to group milestones --- app/controllers/snippets_controller.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'app/controllers/snippets_controller.rb') diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index c1cdc7c9831..be2d3f638ff 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -4,6 +4,7 @@ class SnippetsController < ApplicationController include SpammableActions include SnippetsActions include RendersBlob + include PreviewMarkdown before_action :snippet, only: [:show, :edit, :destroy, :update, :raw] @@ -87,17 +88,6 @@ class SnippetsController < ApplicationController redirect_to snippets_path, status: 302 end - def preview_markdown - result = PreviewMarkdownService.new(@project, current_user, params).execute - - render json: { - body: view_context.markdown(result[:text], skip_project_check: true), - references: { - users: result[:users] - } - } - end - protected def snippet -- cgit v1.2.1