Module: UploaderHelper
- Defined in:
- app/helpers/uploader_helper.rb
Instance Method Summary collapse
- #make_parent_params(parent) ⇒ Object
- #new_upload_path_with_session_information(upload_parent) ⇒ Object
-
#upload_form(parent, display_upload_indicators = true) ⇒ Object
parent is the object to which the uploads will be attached.
Instance Method Details
#make_parent_params(parent) ⇒ Object
13 14 15 |
# File 'app/helpers/uploader_helper.rb', line 13 def make_parent_params(parent) { :parent_id => parent.id, :parent_type => parent.class.to_s } end |
#new_upload_path_with_session_information(upload_parent) ⇒ Object
8 9 10 11 |
# File 'app/helpers/uploader_helper.rb', line 8 def new_upload_path_with_session_information(upload_parent) session_key = ActionController::Base.[:key] swfupload_uploads_path({session_key => [session_key], request_forgery_protection_token => form_authenticity_token}.merge(make_parent_params(upload_parent))) end |
#upload_form(parent, display_upload_indicators = true) ⇒ Object
parent is the object to which the uploads will be attached
4 5 6 |
# File 'app/helpers/uploader_helper.rb', line 4 def upload_form(parent, display_upload_indicators = true) render :partial => 'uploads/swf_upload', :locals => {:parent => parent, :display_upload_indicators => display_upload_indicators} end |