Sha256: 3955f7b603754146df3e8ef21513af53124768a185c1b6106631eaa9c571f212

Contents?: true

Size: 456 Bytes

Versions: 25

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module SingularSubresourceController
    extend ActiveSupport::Concern
    include DenyAccessOverrideBehavior

    included do
      before_action :find_work, only: :work
      load_and_authorize_resource :work, only: :work
      load_and_authorize_resource :file, class: 'FileSet', only: :file, id_param: :id
    end

    def find_work
      @work = Hyrax::WorkRelation.new.find(params[:id])
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-5.0.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-5.0.0.rc3 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-5.0.0.rc2 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-5.0.0.rc1 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.6.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-4.0.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-4.0.0.rc3 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-4.0.0.rc2 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-4.0.0.rc1 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.5.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-4.0.0.beta2 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.4.2 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-4.0.0.beta1 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.4.1 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.4.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.3.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.2.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.1.0 app/controllers/concerns/hyrax/singular_subresource_controller.rb
hyrax-3.0.2 app/controllers/concerns/hyrax/singular_subresource_controller.rb