Fix tag template issue on editor v1 (#1793)
This commit is contained in:
parent
09c82fe69e
commit
4f1a996e6f
1 changed files with 6 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue