projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92fe7a8
)
Only add traces for POST requests
author
Tom Hughes
<tom@compton.nu>
Thu, 9 Feb 2017 21:07:44 +0000
(21:07 +0000)
committer
Tom Hughes
<tom@compton.nu>
Thu, 9 Feb 2017 21:07:44 +0000
(21:07 +0000)
app/controllers/trace_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/trace_controller.rb
b/app/controllers/trace_controller.rb
index f3fa81fd8e2fdeecf9075991dcf9bbc077e77836..e41bd01f31008e4bcf1c1c204555569b874c5350 100644
(file)
--- a/
app/controllers/trace_controller.rb
+++ b/
app/controllers/trace_controller.rb
@@
-103,7
+103,7
@@
class TraceController < ApplicationController
end
def create
- if
params[:trace]
+ if
request.post?
logger.info(params[:trace][:gpx_file].class.name)
if params[:trace][:gpx_file].respond_to?(:read)
@@
-170,7
+170,7
@@
class TraceController < ApplicationController
else
@title = t "trace.edit.title", :name => @trace.name
- if
params[:trace]
+ if
request.post?
@trace.description = params[:trace][:description]
@trace.tagstring = params[:trace][:tagstring]
@trace.visibility = params[:trace][:visibility]