app/controllers/concerns/hyrax/works_controller_behavior.rb
# Finds a solr document matching the id and sets @presenter
# @raise CanCan::AccessDenied if the document is not found or the user doesn't have access to it.
Finds a solr document matching the id and sets @presenter
Finds a solr document matching the id and sets @presenter
def show
      @user_collections = user_collections
      respond_to do |wants|
        wants.html { presenter && parent_presenter }
        wants.json do
          @curation_concern = ActiveFedora::Base.find(params[:id])
          render :show, status: :ok
        end
        additional_response_formats(wants)
        wants.ttl do
          render body: presenter.export_as_ttl, mime_type: Mime[:ttl]
        end
        wants.jsonld do
          render body: presenter.export_as_jsonld, mime_type: Mime[:jsonld]
        end
        wants.nt do
          render body: presenter.export_as_nt, mime_type: Mime[:nt]
        end
      end
    end
def show @user_collections = user_collections respond_to do | wants | wants . html { presenter && parent_presenter } wants . json do @curation_concern = ActiveFedora :: Base . find ( params [ :id ] ) render :show , status : :ok end additional_response_formats ( wants ) wants . ttl do render body : presenter . export_as_ttl , mime_type : Mime [ :ttl ] end wants . jsonld do render body : presenter . export_as_jsonld , mime_type : Mime [ :jsonld ] end wants . nt do render body : presenter . export_as_nt , mime_type : Mime [ :nt ] end end end
Finds a solr document matching the id and sets @presenter
Finds a solr document matching the id and sets @presenter
# load @curation_concern manually because it's skipped for html # @curation_concern = Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: params[:id])
:AccessDenied if the document is not found or the user doesn't have access to it.
: AccessDenied if the document is not found or the user doesn ' t have access to it .