Sha256: 9e5d951d5d26a86c97fcb40b8ae3f7e5fcf936c8b265a1c9af4ad855ff64647f

Contents?: true

Size: 545 Bytes

Versions: 3

Compression:

Stored size: 545 Bytes

Contents

require_dependency "publish_my_data/application_controller"

module PublishMyData
  class VocabulariesController < ApplicationController
    include PublishMyData::DataDownload

    def dump
      vocabulary = Vocabulary.find_by_data_dump(request.url)

      # if we can't find a current download it's cos we haven't generated it yet since ds was modified
      # ... and we should 404.
      url = find_latest_download_url_for_resource(vocabulary)
      raise Tripod::Errors::ResourceNotFound unless url

      redirect_to url
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
publish_my_data-0.0.32 app/controllers/publish_my_data/vocabularies_controller.rb
publish_my_data-0.0.31 app/controllers/publish_my_data/vocabularies_controller.rb
publish_my_data-0.0.30 app/controllers/publish_my_data/vocabularies_controller.rb