Sha256: 8c52a608e1c3bbfd405bc5b2db22ab69baacacfc7da479260ad91ea774cceaf7

Contents?: true

Size: 836 Bytes

Versions: 13

Compression:

Stored size: 836 Bytes

Contents

require File.expand_path('../../helpers/common_objects_helper', __FILE__)
class CommonObjectsController < ApplicationController
  include Hydra::Controller::ControllerBehavior
  layout 'common_objects'

  respond_to(:html)
  include Sufia::Noid # for normalize_identifier method
  prepend_before_filter :normalize_identifier
  def curation_concern
    @curation_concern ||= ActiveFedora::Base.find(params[:id], cast: true)
  end
  before_filter :curation_concern
  helper_method :curation_concern
  helper CommonObjectsHelper

  before_filter :enforce_show_permissions, only: [:show]
  rescue_from Hydra::AccessDenied do |exception|
    redirect_to common_object_stub_information_path(curation_concern)
  end

  def show
    respond_with(curation_concern)
  end

  def show_stub_information
    respond_with(curation_concern)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 app/controllers/common_objects_controller.rb
curate-0.6.5 app/controllers/common_objects_controller.rb
curate-0.6.4 app/controllers/common_objects_controller.rb
curate-0.6.3 app/controllers/common_objects_controller.rb
curate-0.6.1 app/controllers/common_objects_controller.rb
curate-0.6.0 app/controllers/common_objects_controller.rb
curate-0.5.6 app/controllers/common_objects_controller.rb
curate-0.5.5 app/controllers/common_objects_controller.rb
curate-0.5.4 app/controllers/common_objects_controller.rb
curate-0.5.2 app/controllers/common_objects_controller.rb
curate-0.5.1 app/controllers/common_objects_controller.rb
curate-0.5.0 app/controllers/common_objects_controller.rb
curate-0.4.2 app/controllers/common_objects_controller.rb