From 16093fd94dbc4a80198dd92056acc9cb5359ee3d Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 17 Nov 2020 00:55:00 +0100 Subject: [PATCH] Mark RfCs with keyword #loesung as solved --- app/controllers/request_for_comments_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/request_for_comments_controller.rb b/app/controllers/request_for_comments_controller.rb index 9225ddcd..278af642 100644 --- a/app/controllers/request_for_comments_controller.rb +++ b/app/controllers/request_for_comments_controller.rb @@ -93,6 +93,9 @@ class RequestForCommentsController < ApplicationController raise Pundit::NotAuthorizedError if @embed_options[:disable_rfc] @request_for_comment = RequestForComment.new(request_for_comment_params) + + @request_for_comment.solved = true if @request_for_comment.question.include?('#loesung') + respond_to do |format| if @request_for_comment.save # create thread here and execute tests. A run is triggered from the frontend and does not need to be handled here.