class ActionView::Helpers::FormBuilder

def file_field(method, options = {})

# =>
file_field(:attachment, :file, class: 'file_input')

# =>
file_field(:post, :image, accept: 'image/png,image/gif,image/jpeg')

# =>
file_field(:post, :attached, accept: 'text/html')

# =>
file_field(:post, :image, :multiple => true)

# =>
file_field(:user, :avatar)
==== Examples

* :accept - 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.
* :multiple - If set to true, *in most updated browsers* the user will be allowed to select multiple files.
* :disabled - If set to true, the user will not be able to use this input.
* Creates standard HTML attributes for the tag.
==== Options

Using this method inside a +form_for+ block will set the enclosing form's encoding to multipart/form-data.

shown.
hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example
assigned to the template (identified by +object+). Additional options on the input tag can be passed as a
Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object
def file_field(method, options = {})
  self.multipart = true
  @template.file_field(@object_name, method, objectify_options(options))
end