app/controllers/downloads_controller.rb in hydra-head-4.0.0.rc5 vs app/controllers/downloads_controller.rb in hydra-head-4.0.0.rc6
- old
+ new
@@ -5,10 +5,11 @@
# Note: Actual downloads are handled by the index method insead of the show method
# in order to avoid ActionController being clever with the filenames/extensions/formats.
# To download a datastream, pass the datastream id as ?document_id=#{dsid} in the url
def index
- fedora_object = ActiveFedora::Base.load_instance(params[:asset_id])
+ ActiveSupport::Deprecation.warn("DownloadsController is deprecated. Please use FileAssetsController or create a model specific DownloadsController in your own hydra-head.")
+ fedora_object = ActiveFedora::Base.find(params[:asset_id])
if params[:download_id]
@datastream = fedora_object.datastreams[params[:download_id]]
send_datastream @datastream
else
@datastreams = downloadables( fedora_object )