]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces_controller.rb
Move changeset created/closed time ago strings to changesets locale
[rails.git] / app / controllers / traces_controller.rb
index 242f8113c2783430b8b67cffadc34b0b71e95ac1..df6337147566538b89d9fa7b3c76f36b127ce182 100644 (file)
@@ -126,7 +126,7 @@ class TracesController < ApplicationController
         flash[:notice] = t ".trace_uploaded"
         flash[:warning] = t ".traces_waiting", :count => current_user.traces.where(:inserted => false).count if current_user.traces.where(:inserted => false).count > 4
 
         flash[:notice] = t ".trace_uploaded"
         flash[:warning] = t ".traces_waiting", :count => current_user.traces.where(:inserted => false).count if current_user.traces.where(:inserted => false).count > 4
 
-        TraceImporterJob.perform_later(@trace)
+        @trace.schedule_import
         redirect_to :action => :index, :display_name => current_user.display_name
       else
         flash[:error] = t(".upload_failed") if @trace.valid?
         redirect_to :action => :index, :display_name => current_user.display_name
       else
         flash[:error] = t(".upload_failed") if @trace.valid?
@@ -176,7 +176,7 @@ class TracesController < ApplicationController
       trace.visible = false
       trace.save
       flash[:notice] = t ".scheduled_for_deletion"
       trace.visible = false
       trace.save
       flash[:notice] = t ".scheduled_for_deletion"
-      TraceDestroyerJob.perform_later(trace)
+      trace.schedule_destruction
       redirect_to :action => :index, :display_name => trace.user.display_name
     end
   rescue ActiveRecord::RecordNotFound
       redirect_to :action => :index, :display_name => trace.user.display_name
     end
   rescue ActiveRecord::RecordNotFound