aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_helper.rb
diff options
context:
space:
mode:
authorThiago Pinto <tapgyn@gmail.com>2012-12-06 02:21:15 -0500
committerThiago Pinto <tapgyn@gmail.com>2012-12-06 02:21:15 -0500
commit15f26631062ae7258e0ebd1ef128a88f59def760 (patch)
tree47a8e55f105430263355ea87a419826f5c8cd9ec /actionpack/lib/action_view/helpers/form_helper.rb
parent4aced1f0730896128e9b8d68f9cacc00328b31ec (diff)
downloadrails-15f26631062ae7258e0ebd1ef128a88f59def760.tar.gz
rails-15f26631062ae7258e0ebd1ef128a88f59def760.tar.bz2
rails-15f26631062ae7258e0ebd1ef128a88f59def760.zip
adding example for f.file_input
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index be62cf70c6..92b88752d4 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -840,6 +840,9 @@ module ActionView
# file_field(:post, :attached, accept: 'text/html')
# # => <input accept="text/html" type="file" id="post_attached" name="post[attached]" />
#
+ # file_field(:post, :image, accept: 'image/png,image/gif,image/jpeg')
+ # # => <input type="file" id="post_image" name="post[image]" accept="image/png,image/gif,image/jpeg" />
+ #
# file_field(:attachment, :file, class: 'file_input')
# # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
def file_field(object_name, method, options = {})