Return after rendering - stops further processing in controller

This commit is contained in:
J Guthrie 2018-07-25 02:30:59 +01:00
parent 4ae7bb4178
commit a04b19a9ae

View file

@ -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