Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix tag template issue on editor v1 (#1793)
  • Loading branch information
aspittel authored and maestromac committed Feb 13, 2019
1 parent 09c82fe commit 4f1a996
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/controllers/articles_controller.rb
Expand Up @@ -49,6 +49,12 @@ def new
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"
Expand Down

0 comments on commit 4f1a996

Please sign in to comment.