Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Includes:
Fg::H5Uploader
Defined in:
lib/h5_uploader.rb

Instance Method Summary collapse

Methods included from Fg::H5Uploader

#parse_uploader_options, #uploader_field_id, #uploader_js_content

Instance Method Details

#uploader(method, *args) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/h5_uploader.rb', line 45

def uploader(method,*args)
  options = args.extract_options!
  parse_uploader_options options,method
  
  js_tag = @template.javascript_tag do
    uploader_js_content method,options
  end

  @template.(:div,:id => options[:id]) do
    @template.(:noscript) do
      @template.file_field @object_name,method
    end
  end  << js_tag

end