Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/directlytos3/form_builders.rb

Instance Method Summary collapse

Instance Method Details

#s3_file_field(method, options = {}) ⇒ Object Also known as: file_field



4
5
6
7
8
9
10
11
12
13
# File 'lib/directlytos3/form_builders.rb', line 4

def s3_file_field(method, options = {})
  self.multipart = true
  if @options.has_key?(:html) && @options[:html].has_key?(:id) && @options[:html][:id] == 's3-upload-form'
    # file_field(method, options.merge(:name => "file"))
    @template.file_field(@object_name, method, objectify_options(options.merge(:name=>"file")))      
  else
    # file_field(method, options)
    @template.file_field(@object_name, method, objectify_options(options))
  end
end