Sha256: 8ed9a89469e1f29a0fb0729892b2332d789f5f529286ce13b17deaed0e2cb25d
Contents?: true
Size: 583 Bytes
Versions: 13
Compression:
Stored size: 583 Bytes
Contents
module HydraUploaderHelper # Generate the appropriate url for posting uploads to # Uses the +container_id+ method to figure out what container uploads should go into def upload_url upload_url = asset_file_assets_path(:asset_id=>container_id) end # The id of the container that uploads should be posted into # If params[:container_id] is not set, it uses params[:id] (assumes that you're uploading items into the current object) def container_id if !params[:asset_id].nil? return params[:asset_id] else return params[:id] end end end
Version data entries
13 entries across 13 versions & 1 rubygems