From a04b19a9aede097d2d7ea0d5cb10cef69312bbd3 Mon Sep 17 00:00:00 2001 From: J Guthrie Date: Wed, 25 Jul 2018 02:30:59 +0100 Subject: [PATCH] Return after rendering - stops further processing in controller --- app/controllers/traces_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 2e3e6b8e6..9dd82f8bb 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -117,7 +117,7 @@ class TracesController < ApplicationController do_create(params[:trace][:gpx_file], params[:trace][:tagstring], params[:trace][:description], params[:trace][:visibility]) rescue StandardError => ex - render :action => "new" unless @trace.valid? + render :action => "new" and return unless @trace.valid? logger.debug ex end -- 2.43.2