app/controllers/imports_controller.rb
def check_imported
    if @import.state == "imported"
      flash[:notice] = "Sorry, can't be done, this import has already been imported."
      redirect_to imports_path
    end
  end
#status
#client polls this to check on status of import
#such like 1/200 images imported
status
client polls this to check on status of import
such like 1/200 images imported
status client polls this to check on status of import such like 1 / 200 images imported
def check_imported
    if @import.state == "imported"
      flash[:notice] = "Sorry, can't be done, this import has already been imported."
      redirect_to imports_path
    end
  end
def check_imported if @import . state == "imported" flash [ :notice ] = "Sorry, can't be done, this import has already been imported." redirect_to imports_path end end
status
client polls this to check on status of import
such like 1/200 images imported
status client polls this to check on status of import such like 1 / 200 images imported