Skip to content
Browse files

adding example for f.file_input

  • Loading branch information...
1 parent 4aced1f commit 15f26631062ae7258e0ebd1ef128a88f59def760 @thejamespinto thejamespinto committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_view/helpers/form_helper.rb
View
3 actionpack/lib/action_view/helpers/form_helper.rb
@@ -840,6 +840,9 @@ def hidden_field(object_name, method, options = {})
# 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 = {})

0 comments on commit 15f2663

Please sign in to comment.
Something went wrong with that request. Please try again.