]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces_controller.rb
Return after rendering - stops further processing in controller
[rails.git] / app / controllers / traces_controller.rb
index a50f00829815840e332ff5f5cb79923519c0ab7b..9dd82f8bbca4ac13462addb7c09f00ca901bceec 100644 (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" if !@trace.valid?
+        render :action => "new" and return unless @trace.valid?
         logger.debug ex
       end