Sha256: 965866b84330dc1adfd110a3b5c2bce5ff43a9bb76a28d462dae5f2f00d9be00

Contents?: true

Size: 699 Bytes

Versions: 10

Compression:

Stored size: 699 Bytes

Contents

module UploaderHelper

  # parent is the object to which the uploads will be attached
  def upload_form(parent, display_upload_indicators = true)
    render :partial => 'uploads/swf_upload', :locals => {:parent => parent, :display_upload_indicators => display_upload_indicators}
  end

  def new_upload_path_with_session_information(upload_parent)
    session_key = ActionController::Base.session_options[:key]
    swfupload_uploads_path({session_key => cookies[session_key], request_forgery_protection_token => form_authenticity_token}.merge(make_parent_params(upload_parent)))
  end
  
  def make_parent_params(parent)
    { :parent_id => parent.id, :parent_type => parent.class.to_s }
  end
 
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
jbasdf-uploader-0.1.8 app/helpers/uploader_helper.rb
uploader-0.1.10 app/helpers/uploader_helper.rb
uploader-0.1.13 app/helpers/uploader_helper.rb
uploader-0.1.12 app/helpers/uploader_helper.rb
uploader-0.1.14 app/helpers/uploader_helper.rb
uploader-0.1.3 app/helpers/uploader_helper.rb
uploader-0.1.15 app/helpers/uploader_helper.rb
uploader-0.1.9 app/helpers/uploader_helper.rb
uploader-0.1.7 app/helpers/uploader_helper.rb
uploader-0.1.8 app/helpers/uploader_helper.rb