respond_to do |format|
if FileUpload.save
flash[:notice] = 'Successfully Uploaded File.'
format.html { redirect_to(@file_upload) }
else
format.html { render :action => "new" }
end
end
end
1. Admin user goes to form.
2. Admin user selects browse and finds the yaml file.
3. Admin users selects upload.
4. yaml file is read and parsed.
5. model saves the information from the yaml file into a record.
6. uploading begins in another routine based off what was recorded in
step 5.
I hope that helps...
My problem is understanding what to do between steps 3 - 5.
As in YAML.load_file params[:file_upload][:upload].local_path
?
Thanks mate - yes this is exactly what I was looking for. I have not
done a lot of work with reading files and am becoming familiar with how
to do certain things with them. I couldn't figure out how to translate
the local_path and now you showed me.