Fix tag template issue on editor v1 (#1793)

This commit is contained in:
Ali Spittel 2019-02-13 13:43:41 -05:00 committed by Mac Siri
parent 09c82fe69e
commit 4f1a996e6f

View file

@ -49,6 +49,12 @@ class ArticlesController < ApplicationController
authorize Article
Article.new(body_markdown: @tag.submission_template_customized(@user.name),
processed_html: "", user_id: current_user&.id)
elsif @tag.present?
authorize Article
Article.new(
body_markdown: "---\ntitle: \npublished: false\ndescription: \ntags: " + @tag.name + "\n---\n\n",
processed_html: "", user_id: current_user&.id
)
else
skip_authorization
if @user&.editor_version == "v2"