Sha256: 8da3b2815ee4116c7f3090012ea2ae2d2a1142c1b55627e438470d142324c3c4

Contents?: true

Size: 788 Bytes

Versions: 7

Compression:

Stored size: 788 Bytes

Contents

require File.expand_path('../../helpers/common_objects_helper', __FILE__)
class CommonObjectsController < ApplicationController
  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

7 entries across 7 versions & 1 rubygems

Version Path
curate-0.3.2 app/controllers/common_objects_controller.rb
curate-0.3.1 app/controllers/common_objects_controller.rb
curate-0.2.0 app/controllers/common_objects_controller.rb
curate-0.1.3 app/controllers/common_objects_controller.rb
curate-0.1.2 app/controllers/common_objects_controller.rb
curate-0.1.1 app/controllers/common_objects_controller.rb
curate-0.1.0 app/controllers/common_objects_controller.rb