diff options
author | Joost Baaij <joost@spacebabies.nl> | 2010-09-21 15:11:04 +0200 |
---|---|---|
committer | Joost Baaij <joost@spacebabies.nl> | 2010-09-21 15:11:04 +0200 |
commit | b39dfd5936ef25b04d6caad3ceb048c68a79ea12 (patch) | |
tree | b395c9ecfaed39382a73211a3a7c246d4d42ebf6 /actionpack | |
parent | f1fdc4ff0a88c4c906099982bbcb4c9a23b4be3f (diff) | |
download | rails-b39dfd5936ef25b04d6caad3ceb048c68a79ea12.tar.gz rails-b39dfd5936ef25b04d6caad3ceb048c68a79ea12.tar.bz2 rails-b39dfd5936ef25b04d6caad3ceb048c68a79ea12.zip |
Document form_for behaviour when using file_field inside the block
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 700a5a0ef1..3cc412de63 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -668,11 +668,13 @@ module ActionView InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("hidden", options) end - # Returns an file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object + # Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object # assigned to the template (identified by +object+). Additional options on the input tag can be passed as a # hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example # shown. # + # Using this method inside a +form_for+ block will set the enclosing form's encoding to <tt>multipart/form-data</tt>. + # # ==== Examples # file_field(:user, :avatar) # # => <input type="file" id="user_avatar" name="user[avatar]" /> |