end
end
- if params[:tag]
- @traces = @traces.tagged(params[:tag])
- end
+ @traces = @traces.tagged(params[:tag]) if params[:tag]
@page = (params[:page] || 1).to_i
@page_size = 20
@traces = @traces.joins(:user).where(:users => { :display_name => params[:display_name] })
end
- if params[:tag]
- @traces = @traces.tagged(params[:tag])
- end
-
+ @traces = @traces.tagged(params[:tag]) if params[:tag]
@traces = @traces.order("timestamp DESC")
@traces = @traces.limit(20)
@traces = @traces.includes(:user)
# Rename the temporary file to the final name
FileUtils.mv(filename, @trace.trace_name)
- rescue Exception => ex
+ rescue StandardError
# Remove the file as we have failed to update the database
FileUtils.rm_f(filename)
# Clear the inserted flag to make the import daemon load the trace
@trace.inserted = false
@trace.save!
- rescue Exception => ex
+ rescue StandardError
# Remove the file as we have failed to update the database
FileUtils.rm_f(@trace.trace_name)