Sha256: 858eae2fbd555fa7f9fad9fc0f6aaee82b8cb0f9a861b6d381751f28d6693c96

Contents?: true

Size: 678 Bytes

Versions: 3

Compression:

Stored size: 678 Bytes

Contents

module Hyrax
  class CitationsController < ApplicationController
    include WorksControllerBehavior
    include Breadcrumbs
    include SingularSubresourceController

    before_action :build_breadcrumbs, only: [:work, :file]

    def work
      show
    end

    def file
      # We set _@presenter_ here so it isn't set in WorksControllerBehavior#presenter
      # which is intended to find works (not files)
      solr_file = ::SolrDocument.find(params[:id])
      authorize! :show, solr_file
      @presenter = FileSetPresenter.new(solr_file, current_ability, request)
      show
    end

    private

      def show_presenter
        WorkShowPresenter
      end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hyrax-2.0.0.beta3 app/controllers/hyrax/citations_controller.rb
hyrax-2.0.0.beta2 app/controllers/hyrax/citations_controller.rb
hyrax-2.0.0.beta1 app/controllers/hyrax/citations_controller.rb