From: J Guthrie Date: Wed, 25 Jul 2018 01:30:59 +0000 (+0100) Subject: Return after rendering - stops further processing in controller X-Git-Tag: live~2868^2~2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a04b19a9aede097d2d7ea0d5cb10cef69312bbd3?ds=sidebyside Return after rendering - stops further processing in controller --- 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