X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f0feca800d91ac1d23eb63ca17a45d8fd4d41920..641ce5b640cfc74ca6c427fae49a39c08fa641ac:/app/controllers/trace_controller.rb diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index db86684a4..9d0e05530 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -122,8 +122,8 @@ class TraceController < ApplicationController logger.info("id is #{@trace.id}") flash[:notice] = t 'trace.create.trace_uploaded' - if @user.traces.count(:conditions => { :inserted => false }) > 4 - flash[:warning] = t 'trace.trace_header.traces_waiting', :count => @user.traces.count(:conditions => { :inserted => false }) + if @user.traces.where(:inserted => false).count > 4 + flash[:warning] = t 'trace.trace_header.traces_waiting', :count => @user.traces.where(:inserted => false).count end redirect_to :action => :list, :display_name => @user.display_name