@trace.errors.add(:gpx_file, "can't be blank")
end
else
- @trace = Trace.new(:visibility => default_visibility)
+ @trace = Trace.new({:visibility => default_visibility}, :without_protection => true)
end
@title = t 'trace.create.upload_trace'
end
if params[:tag]
- traces = traces.where("EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)")
+ traces = traces.where("EXISTS (SELECT * FROM gpx_file_tags AS gft WHERE gft.gpx_id = gpx_files.id AND gft.tag = ?)", params[:tag])
end
traces = traces.order("timestamp DESC")
:inserted => true,
:user => @user,
:timestamp => Time.now.getutc
- })
+ }, :without_protection => true)
Trace.transaction do
begin