From 7f64e38caac729ec6199e3ec00954de366606bff Mon Sep 17 00:00:00 2001 From: Brunno Souza Date: Tue, 25 Aug 2020 04:47:32 -0300 Subject: [PATCH] Remove method not used at artciles controller (#9877) --- app/controllers/articles_controller.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index c9980c84e..0e8146937 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -292,20 +292,6 @@ class ArticlesController < ApplicationController end end - def redirect_after_creation - @article.decorate - if @article.persisted? - redirect_to @article.current_state_path, notice: "Article was successfully created." - else - if @article.errors.to_h[:body_markdown] == "has already been taken" - @article = current_user.articles.find_by(body_markdown: @article.body_markdown) - redirect_to @article.current_state_path - return - end - render :new - end - end - def allowed_to_change_org_id? potential_user = @article&.user || current_user potential_org_id = params["article"]["organization_id"].presence || @article&.organization_id