aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/form_helpers.txt
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2009-01-01 19:06:26 +0000
committerFrederick Cheung <frederick.cheung@gmail.com>2009-01-01 19:06:26 +0000
commit56634a12971cfb640b28a02f31952029a26e657c (patch)
treedfcf5a5185a13e2da560749ee5f071ee46f68278 /railties/doc/guides/source/form_helpers.txt
parent1dd3df33428c67b15c10729f0fa68140e22cdd0d (diff)
downloadrails-56634a12971cfb640b28a02f31952029a26e657c.tar.gz
rails-56634a12971cfb640b28a02f31952029a26e657c.tar.bz2
rails-56634a12971cfb640b28a02f31952029a26e657c.zip
claridy handling missing files
Diffstat (limited to 'railties/doc/guides/source/form_helpers.txt')
-rw-r--r--railties/doc/guides/source/form_helpers.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/doc/guides/source/form_helpers.txt b/railties/doc/guides/source/form_helpers.txt
index 095df857a2..baa1c4a039 100644
--- a/railties/doc/guides/source/form_helpers.txt
+++ b/railties/doc/guides/source/form_helpers.txt
@@ -600,6 +600,8 @@ end
Once a file has been uploaded there are a multitude of potential tasks, ranging from where to store the files (on disk, Amazon S3, etc) and associating them with models to resizing image files and generating thumbnails. The intricacies of this are beyond the scope of this guide, but there are several plugins designed to assist with these. Two of the better known ones are http://github.com/technoweenie/attachment_fu[Attachment-Fu] and http://www.thoughtbot.com/projects/paperclip[Paperclip].
+NOTE: If the user has not selected a file the corresponding parameter will be an empty string.
+
Dealing with Ajax
~~~~~~~~~~~~~~~~~
Unlike other forms making an asynchronous file upload form is not as simple as replacing `form_for` with `remote_form_for`. With an AJAX form the serialization is done by javascript running inside the browser and since javascript cannot read files from your hard drive the file cannot be uploaded. The most common workaround is to use an invisible iframe that serves as the target for the form submission.