app/controllers/imports_controller.rb
#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 bad_record
    respond_to do | format |
      format.html do
        flash[:notice] = "Import not found"
        redirect_to :root
      end
      format.json {render :json => {:stat => "not found", :items =>[]}.to_json, :status => 404}
    end
  end
def bad_record respond_to do | format | format . html do flash [ :notice ] = "Import not found" redirect_to :root end format . json { render :json => { :stat => "not found" , :items => [ ] } . to_json , :status => 404 } 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