app/controllers/imports_controller.rb
def create
    @import = Import.new(params[:import])
    @import.user = current_user
    @import.state = "ready"
    if @import.save
      flash[:notice] = "New Import Created!"
      redirect_to import_url(@import)
    else
      flash[:error] = "Something went wrong creating the import"
      render :action => 'new'
    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 create
    @import = Import.new(params[:import])
    @import.user = current_user
    @import.state = "ready"
    if @import.save
      flash[:notice] = "New Import Created!"
      redirect_to import_url(@import)
    else
      flash[:error] = "Something went wrong creating the import"
      render :action => 'new'
    end
  end
def create @import = Import . new ( params [ :import ] ) @import . user = current_user @import . state = "ready" if @import . save flash [ :notice ] = "New Import Created!" redirect_to import_url ( @import ) else flash [ :error ] = "Something went wrong creating the import" render :action => 'new' 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