aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Pinto <tapgyn@gmail.com>2012-12-06 02:33:43 -0500
committerThiago Pinto <tapgyn@gmail.com>2012-12-06 02:33:43 -0500
commitd2fb5f2ae6bfe636505d0003fd2c760f4df8151a (patch)
tree107c10d8e7a892d7e770509a35e1a3e3b361e65d
parent15f26631062ae7258e0ebd1ef128a88f59def760 (diff)
downloadrails-d2fb5f2ae6bfe636505d0003fd2c760f4df8151a.tar.gz
rails-d2fb5f2ae6bfe636505d0003fd2c760f4df8151a.tar.bz2
rails-d2fb5f2ae6bfe636505d0003fd2c760f4df8151a.zip
complementary options guidelines for f.file_field and file_field_tag
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb6
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb2
2 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 92b88752d4..5710d1fc02 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -830,6 +830,12 @@ module ActionView
#
# Using this method inside a +form_for+ block will set the enclosing form's encoding to <tt>multipart/form-data</tt>.
#
+ # ==== Options
+ # * Creates standard HTML attributes for the tag.
+ # * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
+ # * <tt>:multiple</tt> - If set to true, *in most updated browsers* the user will be allowed to select multiple files.
+ # * <tt>:accept</tt> - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations.
+ #
# ==== Examples
# file_field(:user, :avatar)
# # => <input type="file" id="user_avatar" name="user[avatar]" />
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index e298751062..ff83ef3ca1 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -233,6 +233,8 @@ module ActionView
# ==== Options
# * Creates standard HTML attributes for the tag.
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
+ # * <tt>:multiple</tt> - If set to true, *in most updated browsers* the user will be allowed to select multiple files.
+ # * <tt>:accept</tt> - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations.
#
# ==== Examples
# file_field_tag 'attachment'